【问题标题】:Get user profile image from instagram从 instagram 获取用户个人资料图片
【发布时间】:2021-04-07 04:58:09
【问题描述】:

我从 Instagram 获取用户个人资料图片,关注 this link。在提供 Instagram 应用程序 ID、密钥和重定向 URI 后,我获得了授权代码,然后根据授权代码我获得了访问令牌。根据访问令牌获得 Instagram 用户 ID 和用户名。

这里是代码

$insta_username = $insta_response['username'];
$jsonData = json_decode(file_get_contents('https://www.instagram.com/'.$insta_username.'/?__a=1'));

在这之后,我得到了这个错误

消息:file_get_contents(https://www.instagram.com/fakenamesofficial/?__a=1):打开流失败:HTTP 请求失败! HTTP/1.1 429 -

【问题讨论】:

标签: php instagram instagram-api


【解决方案1】:

试试 $jsonData = file_get_contents('https://www.instagram.com/'.$insta_username.'/?__a=1');

【讨论】:

  • 请在您的答案中添加一些解释,以便其他人可以从中学习。你做了什么改变,为什么?
猜你喜欢
  • 2015-08-13
  • 1970-01-01
  • 1970-01-01
  • 2021-01-15
  • 1970-01-01
  • 2017-12-20
  • 1970-01-01
  • 2018-12-27
  • 1970-01-01
相关资源
最近更新 更多