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"}];
Randika Vishman
  • 7,983
  • 3
  • 57
  • 80
  • Figured out FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"/me/inbox?limit=50" parameters:nil//@{@"fields":@"data"} HTTPMethod:@"GET"]; – Sunil Panda May 22 '15 at 15:16

1 Answers1

0

Figured out can not pass fields in param

FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                              initWithGraphPath:@"/me/inbox?limit=50"
                              parameters:nil    
                              HTTPMethod:@"GET"];