0

I am integrating my iOS app with facebook. I want to authenticate and send requestWithGraphPath at the same time. How can i do that? Write now i am using following code:

 if (!facebook.isSessionValid) {
            NSLog(@"in else login button tapped");
            NSArray *permissions = [[NSArray alloc] initWithObjects:
                                    @"user_likes", 
                                    @"publish_stream",
                                    @"user_about_me",
                                    @"email",
                                    nil];
            [facebook authorize:permissions];
            [permissions release];

            [facebook requestWithGraphPath:@"me" andDelegate:self]; 
        }

but after requestWithGraphPath is called. My app keep waiting. but next time when i come again and press button then it works fine. Can authenticate and requestWithGraphPath work at the same time when facebook.isSessionValid is false? Thanks in advance.

Piscean
  • 3,069
  • 12
  • 47
  • 96

1 Answers1

0

After you have authorized, if you've setup the delegate properly. And the user comes back to your app, the method:

 -(void)fbDidLogin {

 }

Should trigger, and there you can request the graphPath.

Joakim Engstrom
  • 6,243
  • 12
  • 48
  • 67