我在请求 mutual friends 时遇到错误:
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);
}
}];
MUTUAL ERROR错误Domain = com.facebook.sdk Code = 5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo = 0x788b68f0 {com.facebook.sdk:ParsedJSONResponseKey = {body = {error = {code = 100; message =“不支持的获取请求 . 请阅读https://developers.facebook.com/docs/graph-api处的Graph API文档”; type = GraphMethodException; }; };代码= 400; },com.facebook.sdk:HTTPStatusCode = 400}
friendId 肯定是正确的 . 我做错了什么?
1 回答
问题解决了:“friendId”用户没有授予相应的权限