Why does Facebook iOS dialog for feed publish disappear after login?
- by Mason G. Zhwiti
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];