Question

i need to get inbox and outbox messages in Facebook. but i get error as "operation couldn't be completed (com.facebook.sdk error 5.)

NSString *uid=@"10000350024x";
NSString *path=[NSString stringWithFormat:@"%@/inbox",uid];
[FBRequestConnection startWithGraphPath:path
                             parameters:NULL
                             HTTPMethod:@"GET"
                      completionHandler:^(FBRequestConnection *connection,
                                          id result,
                                          NSError *error) {
                          if (error) {
                              NSLog(@"Error is: %@", [error localizedDescription]);
                          } else {
                              NSLog(@"Result: %@", result);
                          }
                      }];
Était-ce utile?

La solution 2

the error is due to facebook sdk. i had deleted it from the project and inserted new sdk. now it works well.

Autres conseils

What is myuserid? This should always be me, shouldn't it?

Addition: I assume you've asked for read_mailbox permissions

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top