简体   繁体   中英

How to get the photos related to a friend using facebook graph api?

I have all the list of friends which I get using

[facebook requestWithGraphPath:@"me/friends" andDelegate:self];.

Using this I get all the ids of my friends. I get all my photos too by using

 [facebook requestWithGraphPath:@"me/photos" andDelegate:self];.

But what I should I use as the argument in requestWithGraphPath: if I want the photos related to any one of my friends?

Simple trick to fetch your friends photo.

[facebook requestWithGraphPath:@"FriendID/albums" andDelegate:self];

eg

[facebook requestWithGraphPath:@"123456789/albums" andDelegate:self];

which returns album id along with some information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM