0

Why this code gives error in fetching inbox

FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                              initWithGraphPath:@"/me/inbox"
                              parameters:@{@"fields":@"inbox"}
                              HTTPMethod:@"GET"];

Error I get on console :

{
    code = 100;
    message = "You can only access the \"inbox\" connection for the current user.";
}

where as if If I use this code to fetch inbox it fetches me the inbox:

FBSDKGraphRequest *request =[[FBSDKGraphRequest alloc] initWithGraphPath:@"me"
                                                          parameters:@{ @"fields" : @"inbox"}];
4

1 回答 1

0

弄清楚不能传递参数中的字段

FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                              initWithGraphPath:@"/me/inbox?limit=50"
                              parameters:nil    
                              HTTPMethod:@"GET"];
于 2015-05-22T15:17:21.530 回答