如何使用Instagram Graph API在专辑中获取所有图像的媒体_URL?
我正在尝试从Instagram上的专辑帖子(Carousel Post)获取所有媒体URL/源URL。我只能从专辑中获得第一张图片。
以下URL及其ID列出了来自特定线程的消息列表。
messages_list = f"https://graph.facebook.com/{GRAPH_API_VERSION}/{thread_id}?fields=messages&platform=instagram&access_token={access_token}"
这获取了特定消息ID的详细信息。
message_details = f"https://graph.facebook.com/{GRAPH_API_VERSION}/{message_id}?fields={fields}&platform=instagram&access_token={access_token}"
我从message_details
获取专辑帖子请求的响应显示在下面的屏幕截图中。如您所见,它仅显示指向专辑中存在的第一个图像的链接,并在上面及其下方显示Next
和上一个
endpoints的链接。
在访问上一个结果的下一个
下一个结果之后,这就是我得到的。
I'm trying to get all the media urls/source urls from an album post (carousel post) on Instagram. I'm able to get only the first image from the album.
The below url fetches the list of messages from the particular thread along with their ids.
messages_list = f"https://graph.facebook.com/{GRAPH_API_VERSION}/{thread_id}?fields=messages&platform=instagram&access_token={access_token}"
This fetches the details of a particular message id.
message_details = f"https://graph.facebook.com/{GRAPH_API_VERSION}/{message_id}?fields={fields}&platform=instagram&access_token={access_token}"
The response I get from the message_details
GET request for an album post is shown in the screenshot attached below. As you can see it shows only the link to the first image that is present in the album at the top and below it shows the link to next
and previous
endpoints.
After accessing the next
endpoint from the previous result, this is what I got.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要查看提要文章中的所有图像,您可以使用
Media_url
是第一个图像儿童{Media_url}
的链接To see all the images in a feed post you can use
media_url
is the link to the first imagechildren{media_url}
are the links for all the images on the post