开发者

iOS SDK: Feed Dialog without authorize gets send to facebook home page

I ran into an interesting bug and just want to know if anyone did experience the same problem (since I couldn't find anything about it after 2h of google):

I initalize the facebook SDK (newest Version 23. Sept 2011) like this:

facebook = [[Facebook alloc] initWithAppId:FACEBOOK_APP_ID andDelegate:self];

Afterwards, I want to send some information to the users Wall without the authorization dialog:

NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
     FACEBOOK_APP_ID, @"app_id",
     @"http://itunes.apple.com/de/app/idxyz", @"link",
     @"http://example.com/app_icon90px_d_p_i_g.png", @"picture",
     @"AppName", @"name",
     @"awesome new App. Look at it. Yadda Yadda Yadda", @"caption",
     @"Here's an even more interesting description", @"description",
     nil];

[facebook dialog:@"feed"
        andParams:params
      andDelegate:self];    

What happens: The Facebook dialog opens and asks for the user email and password. Cool, everythings fine till yet. But if I provide the system with my email and password it doesn't change back to the post-to-wall dialog but instead shows the facebook user/home page. If you abort the dialog now and recall the method above, it goes 开发者_Go百科directly to the feed-dialoge. The workaround to authenticate the app with facebook first is no solution :-(


It's May 2012 now and I experienced similar problem where the user already authenticated via SSO but when I call the feed dialog, it pops up the web modal with a login page instead of the normal feed dialog.

Turn out it's Facebook server issue and I can't reproduce the issue again after that hair-pulling one day debug.

More details: I don't request for offline_access because it is going to be deprecated in July. So at first I thought that's the reason why my session expired and I checked everything regarding automatic extending the token in applicationDidBecomeActive. But the problem still exists.

I then even print out the token and check the validity of the token using graph.facebook.com/me/permissions call on the browser!

A few times during that day, the dialog just return an error saying "There's error, try again later". So that's when I decided to leave it and try again the next day and it just worked!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜