フレンドリストを取得できました:
//token
NSString *acessToken = [NSString stringWithFormat:@"%@",_facebookAccount.credential.oauthToken];
NSDictionary *parameters = @{@"access_token": acessToken};
// Create the URL to the end point
NSURL *friendsList = [NSURL URLWithString:@"https://graph.facebook.com/me/friends"];
// Create the SLReqeust
SLRequest *getFriends = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodGET URL:friendsList parameters:parameters];
また、プレイしている友達を取得する必要がありますが、エラーが発生します。
me/friends?fields=installed
{
error = {
code = 2500;
message = "An active access token must be used to query information about the current user.";
type = OAuthException;
};
}
このために要求する必要がある特別な許可はありますか? 私は今これらを使用しています:
@"read_stream", @"email", @"read_friendlists"
ありがとう