at the moment I am trying to implement the Facebook API in one of my iOS Apps. But now I have a small problem.
I can access my user information or my friend list but I have a problem to get all my objects of my inbox. Of course I set the access token. But now I don't know how to get the messages (or开发者_开发问答 called threads in Facebook see: http://developers.facebook.com/docs/reference/api/thread/)
- (NSArray*) getUserMessages {
NSArray *result = [[NSArray alloc] initWithObjects:@"test", nil];
[facebook requestWithGraphPath:@"me/threads" andDelegate:self];
return result;
}
I also get a callback of my delegate method:
- (void) request:(FBRequest *)request didLoad:(id)result {
NSLog(@"%@", [result description]);
}
I would be kind if someone could help me!
Best regards
xen
necessarily set "read_mailbox" in read permissions
-(void)readFBMessages{
[FBRequestConnection startWithGraphPath:@"/me/threads"
parameters:nil
HTTPMethod:@"GET"
completionHandler:^(
FBRequestConnection *connection,
id result,
NSError *error
) {
self.tableData = result[@"data"];
[self.tableSearch reloadData];
}];
}
精彩评论