由於以下步驟需要很長時間;
1)使用得到朋友的UID:
NSString *urlString=[NSString stringWithFormat:@"https://graph.facebook.com/me/friends?access_token=%@&fields=id,picture,name,birthday",fbGraph.accessToken];
2)把朋友的uid拿到相冊ID:
NSString *urlString1=[NSString stringWithFormat:@"https://graph.facebook.com/%@/albums?access_token=%@",obj.uid,fbGraph.accessToken];
NSString *album = [[[_response1 objectForKey:@"data"]objectAtIndex:j]objectForKey:@"name"];
if ([album isEqualToString:@"Profile Pictures"])
{
albumid = [[[_response1 objectForKey:@"data"]objectAtIndex:j]objectForKey:@"id"];
}
3)然後把這張專輯的ID來獲得從該相冊的照片:
NSString *albumUrl=[NSString stringWithFormat:@"https://graph.facebook.com/%@/photos?type=album&access_token=%@",albumid,fbGraph.accessToken];
NSString *picUrl=[[[[[_response2 objectForKey:@"data"]objectAtIndex:0]objectForKey:@"images"]objectAtIndex:0]objectForKey:@"source"];
請告訴我一些其他的方法來獲得大尺寸的個人資料照片,以節省時間。
http://stackoverflow.com/questions/30207465/ios-facebook-album- photos-picker/31789234#31789234 – 2015-08-07 01:03:02