我正在为我的iOS应用运行以下Facebook FQL。它给了我错误:
我已经测试了权限,它们似乎没问题。此外,Facebook应用程序(在开发人员部分)中的软件包ID与应用程序上的软件包ID相匹配。我该如何解决这个问题?
-(void)FetchFBFriends
{
// Query to fetch the active user's friends, limit to 25.
NSString *query =
@"SELECT uid, name, pic_square FROM user WHERE is_app_user=0 AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) ";
// Set up the query parameter
NSDictionary *queryParam =
[NSDictionary dictionaryWithObjectsAndKeys:query, @"q", nil];
// Make the API request that uses FQL
[FBRequestConnection startWithGraphPath:@"/fql"
parameters:queryParam
HTTPMethod:@"GET"
completionHandler:^(FBRequestConnection *connection,
id result,
NSError *error) {
if (error) {
NSLog(@"Error: %@", [error localizedDescription]);
} else {
NSLog(@"Result: %@", result);
FBFriendsArray = (NSArray *) [result objectForKey:@"data"];
//NSLog(@"FBFriendsArray %@",FBFriendsArray);
[FBFriendListTableView reloadData];
}
}];
}