[英]How To Retrive Facebook Profile Picture Comments using Graph API or FQL
I have tried all query but I can not get profile picture Id . 我已经尝试了所有查询,但我无法获取个人资料图片ID 。
because basic Syntax of graph API is here . 因为图API的基本语法在这里 。
if i get picture_id i can query like this profile_picture_id?fields=comments
so it will give a all profile picture comments. 如果我得到picture_id我可以查询这个profile_picture_id?fields=comments
所以它会给出一个所有的个人资料图片评论。
please help me how to get Profile picture id? 请帮我如何获取个人资料图片ID?
To get the id
of the profile picture - 要获取个人资料图片的id
-
Get all facebook albums of the user by - 获取用户的所有脸谱专辑 -
/me/albums
Loop through the each object of the above albums and check if - 循环浏览上述相册的每个对象,并检查是否 -
type == 'profile'
and get the album id from this object. 并从此对象获取相册ID。
For this album_id, get the value of object cover_photo 对于此album_id,获取对象cover_photo的值
/<album-id>?fields=cover_photo
This value of cover_photo is the id of profile pic of the user. cover_photo的该值是用户的简档pic的id 。
为FQL这项工作对我来说 -
SELECT object_id FROM album WHERE owner=USER_ID AND type="profile"
使用FQL ,您可以使用此单结果查询获取当前的个人资料图片ID:
SELECT cover_object_id FROM album WHERE owner=USER_ID AND type="profile"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.