about 9 years ago
Note :- Facebook provides only 25 latest chat conversation messages
/This is completion handler method and takes 3-4 sec to load chat messages from FB/
NSMutableArray *arrConversation = [[NSMutableArray alloc]init];
NSArray *arrPermission = @[@"read_mailbox"]; if ([[FBSession activeSession]isOpen]) {
[FBRequestConnection startWithGraphPath:@"/me?fields=inbox" completionHandler:^(FBRequestConnection *connection,id user, NSError *error) { if (error) { //Sorry check permission or network. } else { //Here we can save conversations into an array and print that array... arrConversation = [[user valueForKey:@"inbox"] valueForKey:@"data"]; NSLog(@"%@", arrConversation); } }]; }else{ [FBSession openActiveSessionWithReadPermissions:arrPermission allowLoginUI:YES completionHandler:^(FBSession *session, FBSessionState status, NSError *error) { if (error) { //Sorry check permission or network. } else { NSLog(@"%u", status); } }]; }
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)