问题
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?
回答1:
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.
回答2:
After authentication you receive a token. Use it to request graph API and you are authenticated with user depend of this token.
来源:https://stackoverflow.com/questions/4254197/after-oauth-with-facebook-how-do-i-get-the-graph-of-the-pages-created-by-user