我设法获得了朋友列表:
//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"
谢谢