我在请求共同好友时出错:
NSDictionary *params = @{
@"fields": @"context.fields(mutual_friends)",
};
/* make the API call */
[FBRequestConnection startWithGraphPath:[NSString stringWithFormat: @"/%@", friendId]
parameters:params
HTTPMethod:@"GET"
completionHandler:^(
FBRequestConnection *connection,
id result,
NSError *error
) {
/* handle the result */
if (!error) {
NSLog(@"MUTUALS = %@",result);
} else {
NSLog(@"MUTUAL ERROR %@",error);
}
}];
相互错误错误域=com.facebook.sdk代码=5"操作无法完成。(com.facebook.dk错误5.)"用户信息=0x788b68f0{com.facebook.sedk:ParsedJSONResponseKey={body={错误={代码=100;message="不支持的get请求。请阅读上的Graph API文档https://developers.facebook.com/docs/graph-api";type=GraphMethodException;};};代码=400;},com.facebook.sdk:HTTPStatusCode=400}
friendId当然是正确的。我做错了什么?
问题解决了:具有"friendId"的用户没有授予相应的权限