[英]Facebook - get user likes and comments
Is it possible to get the user likes and comments from facebook? 是否可以从Facebook获得用户的喜欢和评论 ?
With the graph api, you can can do me/likes
, but that only returns the pages you liked, and I want all the likes. 使用图谱api,您可以执行
me/likes
,但那只会返回您喜欢的页面,而我想要所有喜欢。 So also the url's, posts, pictures, ... I liked. 网址,帖子,图片等等,我也喜欢。 The same for the comments.
评论也一样。
Or is there a query to get the activity log from an user? 还是有查询要从用户获取活动日志?
You can use the 您可以使用
like
table ( https://developers.facebook.com/docs/reference/fql/like/ ) like
表like
FQL( https://developers.facebook.com/docs/reference/fql/like/ ) comment
table ( https://developers.facebook.com/docs/reference/fql/comment/ ) comment
表( https://developers.facebook.com/docs/reference/fql/comment/ ) to query for object comments and likes. 查询对象的评论和喜欢。 Then, if you want to distinguish between object types (
photo, album, event, group, note, link, video, application, status, check-in, review, comment, post
) for getting more info about the like or comment, you need to do queries like this for each object type: 然后,如果您想区分对象类型(
photo, album, event, group, note, link, video, application, status, check-in, review, comment, post
)以获取有关喜欢或评论的更多信息,则可以需要针对每个对象类型执行以下查询:
select src, link from photo where object_id in (select object_id from like where user_id=me() and object_type="photo" limit 25)
For URL likes you can use 对于喜欢的网址,您可以使用
url_like
table https://developers.facebook.com/docs/reference/fql/url_like/ url_like
表https://developers.facebook.com/docs/reference/fql/url_like/ You can use the Graph API. 您可以使用Graph API。 You have to fetch them with different end-points, like:
您必须使用不同的端点来获取它们,例如:
Get the posts with: /me/feed
- demo 通过以下方式获取帖子 :
/me/feed
演示
Perms req: read_stream
烫发要求:
read_stream
Get the photos with: /me/photo
- demo 使用以下方法获取照片 :
/me/photo
演示
Perms req: user_photos
user_photos
: user_photos
Now, to get the likes use this: 现在,要获得喜欢,请使用以下命令:
/likes?id={post_id|photo_id|url}
for comments : 征求意见 :
/comments?id={post_id|photo_id|url}
You can test your calls in Graph API Explorer 您可以在Graph API Explorer中测试您的调用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.