Why does Facebook iOS dialog for feed publish disappear after login?

Posted by Mason G. Zhwiti on Stack Overflow See other posts from Stack Overflow or by Mason G. Zhwiti
Published on 2012-03-26T21:16:08Z Indexed on 2012/03/27 5:30 UTC
Read the original article Hit count: 576

Filed under:
|
|

I'm trying to use the Facebook iOS "feed" dialog call to allow my app's user to share something on their Facebook wall. When the facebook app is not installed, it attempts to let them authenticate within the app (presumably using a web view). The issue is that this dialog just disappears once they authenticate. I was expecting the web view to return to the "feed" sharing view.

How do I detect that they authenticated so that I can re-open the feed dialog?

I've added fbDidLogin to my app delegate, but it's not being called. (I wasn't sure if this would normally be called or not, but I read several people recommending this.)

    SBJSON *jsonWriter = [SBJSON new];

    // The action links to be shown with the post in the feed
    NSArray* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
                                                      @"More Videos",@"name",@"http://www.example.com/",@"link", nil], nil];
    NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];

    NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   @"Test Caption", @"caption",
                                   @"Test Description", @"description",
                                   @"https://s3.amazonaws.com/example/images/test.png",
                                   @"source",
                                   self.video.blogLink, @"link",
                                   @"01234567890123", @"app_id",
                                   actionLinksStr, @"actions",
                                   nil];
    [delegate facebook].sessionDelegate = delegate;
    [[delegate facebook] dialog:@"feed" andParams:params andDelegate:self];

© Stack Overflow or respective owner

Related posts about ios

Related posts about facebook