3

How can I retrieve friends picture using graph api. I have manage to get my friends profile picture using this

https://graph.facebook.com/{user_id}

But, I want to get the photos my friend has posted.

I am able to get this data

"link": "http://www.facebook.com/photo.php?fbid=121312&set=a.23342344855.11344514&type=1",
     "name": "~KAALAM moments :)",
     "caption": "51 new photos",
     "icon": "http://static.ak.fbcdn.net/rsrc.php/v1/yz/r/StEh3RhPvjk.gif",
     "actions": [
        {
           "name": "Comment",
           "link": "http://www.facebook.com/1140004514/posts/12234"
        },
        {
           "name": "Like",
           "link": "http://www.facebook.com/1140004514/posts/12234"
        }
     ],
     "type": "photo",
     "object_id": "2554798026153",
Robin Carlo Catacutan
  • 13,249
  • 11
  • 52
  • 85

1 Answers1

2

To get your friend's pictures you will need

  1. Valid access token with friends_photos
  2. HTTP GET \{friendId}\photos to get photo's the friend is tagged in

or

  1. Valid access token with friends_photos
  2. HTTP GET \{friendId}\albums to get a friend's albums listing, loop thru it to get the photos in each album by \{albumId}\photos

Try it out here: https://developers.facebook.com/tools/explorer

DMCS
  • 31,720
  • 14
  • 71
  • 104