Has anyone successfully accessed the user's friend list via the Facebook API?
I wrote code to authenticate users on my site through the OAuth API via Facebook. It works great; I can access public information, likes, interests, actions, etc. I access these data points through the following URL format, where I replace "uid" with a valid identifier (I use uid instead of "me" because "I" does not work as advertised):
https://graph.facebook.com/uid?access_token= ...
https://graph.facebook.com/uid/likes?access_token= ...
https://graph.facebook.com/uid/interests?access_token= ...
https://graph.facebook.com/uid/activities?access_token= ...
However, access to friends just doesn't work. URL
https://graph.facebook.com/uid/friends?access_token= ...
returns the following error:
{ "error": { "type": "OAuthAccessTokenException", "message": "An access token is required to request this resource." } }
The examples in the graphics API all work, but the access token generated on this page has a different format than mine. I do not know why. I followed their instructions on the tee (and whether it worked for everything else!).
Friends are considered public information , and I double-checked Facebook permissions, so I donβt think the problem is.
facebook oauth facebook-graph-api
thebossman
source share