我正在使用图形api (通过android和图形资源管理器)来获取页面的帖子,当我看到一个页面的帖子中有多个图像时,它就变成了一张相册。
示例后响应
"message": "Test Multi-Photos",
"full_picture": "",
"from": {
"name": "TestPage",
"id": ""
},
"attachments": {
"data": [
{
"media_type": "album",
"media": {
"image": {
"height": 405,
"src": "",
"width": 720
}
},
"type": "album",
"title": "Photos from TestPage's post",
"target": {
"id": "147710857059579",
"url": ""
}
}
]
},
"id": "_147710857059579"
}
当我尝试使用target.id
获取相册照片时
我相信这个网址会是这样的
https://graph.facebook.com/147710857059579
我收到一个回复说端点被废弃了
{
"error": {
"message": "(#12) singular statuses API is deprecated for versions v2.4 and higher",
"type": "OAuthException",
"code": 12,
"fbtrace_id": "AhhiY7ohbb5SoXdFNDZnHhU
"
}
}
文档没有提到它被反对,所以你如何得到相册照片?
发布于 2022-09-12 16:27:52
要从相册帖子中获取照片,您必须将subattachments
添加到查询中的附件字段。
使用Android的示例
parameters.putString("fields", "message,full_picture,from,place,attachments{media_type,media,type,title,description,target,subattachments}")
parameters.putString("limit", "10")
https://stackoverflow.com/questions/73689846
复制相似问题