0
我正在尋找關於如何使用Facebook連接的想法。我可以使用點擊按鈕上的Facebook連接來訪問Facebook。我寫的方法:登錄後返回朋友的個人資料圖片
-(void)login
{
NSMutableDictionary *params=[NSMutableDictionary dictionary];
[params setValue:apiString forKey:@"client_id"];
[_facebook setSessionDelegate:self];
[_facebook dialog:@"oauth" andParams:params andDelegate:self];
}
-(void)fbDidLogin
{enter code here
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys: @"4", @"uids", @"name", @"fields", nil];
[_facebook requestWithMethodName: @"users.getInfo" andParams: params andHttpMethod: @"GET" andDelegate: self];
[_facebook requestWithGraphPath:@"me/friends" andDelegate:self];
}
- (void)request:(FBRequest *)request didReceiveResponse:(NSURLResponse *)response {
NSLog(@"received response");
}
- (void)request:(FBRequest *)request didLoad:(id)result// This method i am using to access all friends name and id after loging.
{
if ([result isKindOfClass:[NSArray class]]) {
result = [result objectAtIndex:0];
}
NSLog(@"%@" ,result);
}
現在我的要求是,與朋友的名字,我需要訪問他們的個人資料形象。 如何獲取朋友的個人資料圖片?
我正在使用JSON訪問Facebook連接。