4

So I took a look at this question addressing my issue: Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app

I'm confused about the app and app permissions. I'm basically trying to do the exact same thing, but in a python script I wish to execute from the command line.

The line in my code

friends = graph.get_object('me/friends')

Returns only three people on my friends list along with the total number of friends, and I understand this is because it only returns the users who authorize my 'app'. What I'm confused about is to what this 'app' is exactly referring. Can someone please explain what this means, how permission is granted, and why 'friends' is returning two people when I never explicitly requested permissions from anybody?

Also, for my Graph API access token I only requested user_friends

Thanks

Community
  • 1
  • 1
Dalton Sweeney
  • 1,108
  • 3
  • 11
  • 24
  • Well it refers to your app that you are creating. Talking to the API requires an app. And if you want this your app to be able to see your friends, then those friends must login to your app and grant it permission. And granting permission works by implementing the OAuth login flow. – CBroe Feb 08 '17 at 12:19
  • Ok, but if that is all necessary to gain permission, then why does the call still return some friends? How did they grant permission if I never implemented the OAuth login flow? – Dalton Sweeney Feb 08 '17 at 14:30
  • Well what app did you use in Graph API Explorer? Did you chose one you created yourself - or did you just use the Graph API Explorer _app_? Easily possible that some of your friends used the latter before themselves while testing something. – CBroe Feb 08 '17 at 15:00
  • I think I was using the Graph API Explorer app. When I requested the access token I think it linked to my personal facebook account, which was already logged in in my browser – Dalton Sweeney Feb 08 '17 at 15:03

0 Answers0