【问题标题】:Instagram stories php cURL 5xx Server ErrorInstagram 故事 php cURL 5xx 服务器错误
【发布时间】:2017-08-30 04:45:02
【问题描述】:

我正在尝试访问 Instagram Stories 端点,如 herehere 所述,但使用 PHP - 发送通过 Spy HTTP Chrome 扩展获得的 user_id 和 sessionid。

我收到响应/错误:string(105) "5xx Server Error" ¿ 它可能是什么?

此外,当我将用户代理更改为 Instagram 10.8.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US 时,我得到 string(67) "{"message": "login_required", "logout_reason": 2, "status": "fail"}"

function Geturl($url){
    $process = curl_init($url);
    curl_setopt($process, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($process, CURLOPT_COOKIE, "ds_user_id=XXXXXX; sessionid=XXXXXX");
    curl_setopt($process, CURLOPT_USERAGENT, "Instagram 9.5.1 (iPhone9,2; iOS 10_0_2; en_US; en-US; scale=2.61; 1080x1920) AppleWebKit/420+");
    $return = curl_exec($process); 
    if(curl_error($process))
    {
        return 'error:' . curl_error($process);
    }
    curl_close($process); 

    return $return;
}

var_dump(Geturl("https://i.instagram.com/api/v1/feed/reels_tray/"));

【问题讨论】:

    标签: php curl instagram instagram-api


    【解决方案1】:

    URL 端点错误,工作 URL 是:

    var_dump(Geturl("http://i.instagram.com/api/v1/feed/user/user-id/reel_media/"));
    

    【讨论】:

      猜你喜欢
      • 2013-07-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-04
      • 2012-08-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多