我正在为我的 iOS 应用程序运行以下 Facebook FQL。它给了我错误:
**Error: The operation couldn’t be completed. (com.facebook.sdk error 5.)**
我已经测试了权限,它们似乎很好。facebook 应用程序(在开发人员部分)中的包 ID 也与应用程序上的包 ID 匹配。我该如何解决这个问题?
NSString *query =
@"SELECT recipient_id, title_text, notification_id, object_id FROM notification WHERE recipient_id = me() and is_unread = 1";
// 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);
notifications = [result objectForKey:@"data"];
//NSLog(@"%d", [array count]);
NSString *notificationPressed = [NSString stringWithFormat:@" %d unread notifications", [notifications count]];
[self.fliteController say:notificationPressed withVoice:self.slt];
}
}];