Reputation: 13
I am doing some research into the capacity of Facebook Connect. I have some questions on how a couple of bits of functionality.
The idea of this is that a user would log in using my site and then they could search through their friends and select one, and the site would get that friends users id and store it to the sites database.
After getting the friends user id, would it then be possible to get their photos? Or would the friend need to give the site permission to do that?
I am looking into a site where you can buy a greetings card for a friend, and i wanted to know whether my users would be able to login via facebook, pick a friend, get a photo and then at the time of their birthday it would send them a private message (which i think i know how to do) linking them back to my site where they could view the birthday card and their photo.
Thanks
Upvotes: 1
Views: 3263
Reputation: 4439
To answer your questions:
Yes. Once you have an access token from the login process for a user, make a Graph API request to https://graph.facebook.com/me/friends
. You can test this for yourself here: https://developers.facebook.com/tools/explorer?method=GET&path=me%2Ffriends
Yes. During the login process, you must request user_photos
and friends_photos
permissions after which you can use the access token for a Graph API request to https://graph.facebook.com/USERID/photos
. This will only return those photos for a friend which the user is allowed to see for the current privacy settings.
Upvotes: 2