36
Views
1
Comments
[Facebook Connector] Getting user token to get profile picture
Question
facebook-connector
Web icon
Forge asset by OutSystems MVPs

We are using Facebook conector, and one of the things we do is use the facebook profile picture of the user, as his profile picture in our platform.

To do that we use an external url where we pass the user facebookid  that is saved in our database, and that looks like this:

https://graph.facebook.com/v6.0/109355004052876/picture

But we realised that for some users, to be able to get the picture we also need in some situations to give a user token. As you can see from this response.

 "error": {
    "message": "An access token is required to request this resource.",
    "type": "OAuthException",
    "code": 104,
    "fbtrace_id": "AR1EnBmJ9jIN0DmKrGoymHE"
  }
}


this is how the URL should be:

https://graph.facebook.com/v6.0/109355004052876/picture?redirect=false&access_token={user_token}

But we weren't able to figure out where with facebook connector we get this token that doesn't expire.

2018-08-27 08-29-35
Fábio Vaz

Bruno Monteiro wrote:

Bruno when you do the login, the profile picture is returned, in this action you can get it



Use this structure:

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.