[英]android:Get photo from facebook post using graph api
I'm using Graph API in my android app to get posts of a facebook page.The result is JSONObject. 我在我的Android应用程序中使用Graph API来获取Facebook页面的帖子。结果是JSONObject。
Posts are of 3 types - status, link, photo 帖子分为3种类型-状态,链接,照片
For a post of type photo contains a picture which is available in the page album. 对于类型的帖子, photo包含可在页面相册中使用的图片。
I'm loading this image from the picture field(typically a web URL) in the response json object. 我从响应json对象中的图片字段(通常是Web URL)加载此图像。 However the image is of poor quality.
但是,图像质量较差。
To get the original picture, I should get it from the album/photos of the page. 要获取原始图片,我应该从页面的相册/照片中获取。
Problem : The problem in the second case is, How do I get the id for that picture from the post? 问题 :第二种情况的问题是,如何从帖子中获取该图片的ID? to query it from the album.
从相册中查询。
The id is in the field object_id in the json. 该ID位于json中的object_id字段中。
You have to make an additional call with this ID then. 然后,您必须使用此ID拨打其他电话。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.