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"}];
Figured out can not pass fields in param
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/me/inbox?limit=50"
parameters:nil
HTTPMethod:@"GET"];