使用Facebook GraphAPI或FQL获取Facebook活动日志 [英] Use Facebook GraphAPI or FQL to get Facebook activity log
问题描述
我可以使用浏览器浏览我的活动日志 ( https://www.facebook.com/help/437430672945092 )
I can explore my activity log using browser (https://www.facebook.com/help/437430672945092)
我想编写一个应用程序来分析我的Facebook数据.
I wants to write a app to analyze my facebook data.
是否可以使用GraphAPI或FQL获取我的活动日志?
Is there any way to get my activity log using GraphAPI or FQL?
推荐答案
这是可能的,但不能通过单个查询请求.必须同时使用Graph API请求和FQL查询.您需要适当的访问令牌权限才能执行此操作.
This is possible, but not via a single request of query. It's neccessary to use a combination of both Graph API requests, as well as FQL queries. You'll need the appropriate Access Token Permissions to do this.
您的所有帖子:
https://graph.facebook.com/me/posts?since=UNIX_TIMESTAMP&access_token=YOUR_ACCESS_TOKEN
所有OpenGraph操作.这可能会很冗长,请参见 https://developers.facebook.com/docs/reference/opengraph og.likes示例:
All of your OpenGraph Actions. This can get lengthy, see the list at https://developers.facebook.com/docs/reference/opengraph Example for the og.likes:
https://graph.facebook.com/me/og.likes?since=UNIX_TIMESTAMP&access_token=YOUR_ACCESS_TOKEN
对于自定义OpenGraph Actions,您必须根据Actions的定义来创建查询.在此处查看文档 https://developers.facebook.com/docs/opengraph/using- objects#read Foursquare签到示例:
For custom OpenGraph Actions, you have to create the queries depending on the definition of the Actions. See docs here https://developers.facebook.com/docs/opengraph/using-objects#read Sample for Foursquare Checkins:
https://graph.facebook.com/me/playfoursquare:checkin_to?since=UNIX_TIMESTAMP&access_token=YOUR_ACCESS_TOKEN
所有喜欢的对象(FQL):
All of your Object Likes (FQL):
select object_id from like where user_id = me()
您的所有网址喜欢(FQL):
All of your URL Likes (FQL):
select url from url_like where user_id = me()
您的所有页面点赞(FQL):
All of your Page Likes (FQL):
select page_id, name, categories from page where page_id in (select page_id from page_fan where uid = me())
我确定我忘记了一些信息,但是我认为这里的信息并不是很简单,并且没有多合一"查询可以完成您想要实现的目标.
I'm sure that I forgot some, but I think the message is here that it's not really simple and there's not a "all-in-one" query which can do what you want to achieve.
这篇关于使用Facebook GraphAPI或FQL获取Facebook活动日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!