我有一个应用程序,我们雇用Facebook登录,并有我们的用户通过Instagram基本显示API连接他们的Instagram帐户。
因此,我为每个用户都有一个Instagram基本显示访问令牌,我有他们的‘帐户ids’,但我不知道如何通过这个API获取用户的头像?
发布于 2021-03-10 17:44:40
如果您可以获取用户的username
,则可以使用以下链接:GET
:https://www.instagram.com/username/?__a=1
示例如下:
https://www.instagram.com/instagram/?__a=1
然后您将获得用户instagram
的用户信息
你可以在"profile_pic_url"
:& "profile_pic_url_hd"
的消息Body
中找到图片的src url,这是个人资料照片的链接,希望它能有所帮助。
发布于 2021-03-04 18:33:00
你集成了Instagram的Graph API吗?参考:https://developers.facebook.com/docs/instagram-basic-display-api/reference/user
发布于 2021-03-11 13:45:27
因为你有一个用户访问令牌,这意味着你可以有一个用户Instagram id。
GET graph.facebook.com/v10.0/{instagram-user-id}
response : {.....,
has_profile_picture: bool type
profile_pic : url sting type
....
}
上面的API将帮助你,更多的,你可以点击下面的链接,它有获取用户详细信息所需的所有信息。https://developers.facebook.com/docs/graph-api/reference/instagram-user/
https://stackoverflow.com/questions/66418255
复制相似问题