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にアクセスしています。