Search code examples
ruby-on-railsfacebook-graph-apikoala

Get user information through the Access Token Application


Can I get and show pictures of users through the Graph API with just the access token application?, for example collect the user information for show it in a same page, of course those users been accepted the permissions of the web app and then other user can access to the web and see the information of all those users. All this only storing the ids of facebook, I mean, for get in the same page the information of the users, I want to make a call through the API and retrieve his information by the facebook ID stored in database.


Solution

  • You can show public data of user using his/her user ID and Application Access token , which include name and profile picture.

    https://graph.facebook.com/<user_id>
    

    Submitting a GET HTTP request on above URL with correct user id will give you publicly available data. You can add fields to get more public data like profile photo.