Use Facebook GraphAPI or FQL to get Facebook activity log

感情迁移 提交于 2019-12-08 13:20:51

问题


I can explore my activity log using browser (https://www.facebook.com/help/437430672945092)

I wants to write a app to analyze my facebook data.

Is there any way to get my activity log using GraphAPI or FQL?


回答1:


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.

All of your Posts:

https://graph.facebook.com/me/posts?since=UNIX_TIMESTAMP&access_token=YOUR_ACCESS_TOKEN

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

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

All of your Object Likes (FQL):

select object_id from like where user_id = me()

All of your URL Likes (FQL):

select url from url_like where user_id = me()

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.



来源:https://stackoverflow.com/questions/20662145/use-facebook-graphapi-or-fql-to-get-facebook-activity-log

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!