After Oauth with facebook , how do I get the graph

2019-08-19 15:42发布

After OAuth with facebook , how do I get the graph of the pages created by user? I search over the documentation and event search inside the callback that facebook send me after the OAuth , I still can't get the pages that the user create , I have to use FQL for this? And how do I use FQL in rails?

2条回答
Melony?
2楼-- · 2019-08-19 16:17

You can use the graph api to query for this information after you have logged in using OAuth.

Facebook uses an unintuitive name for this interface - accounts. The URL you are looking for is - https://graph.facebook.com/me/accounts?access_token= < your_access_token >

This should list out a JSON array of objects that have been created by the logged in user. The pages created by the user will be in this list along with the list of pages that they are fans of.

查看更多
ら.Afraid
3楼-- · 2019-08-19 16:28

After authentication you receive a token. Use it to request graph API and you are authenticated with user depend of this token.

查看更多
登录 后发表回答