简体   繁体   中英

FBWebDialog and Logout issue in Facebook SDK in ios

I am using Facebook SDK 3.2 in my iphone Application, i have used FBLoginView to login and logout from Facebook. and two buttons: first to post content on user's wall and second to post content on Friend's wall. In both i am using FBWebDialog. when user starts application login page opens (in safari) and everything works fine.

But i am facing following Problems:

  1. if user want to login using another facebook id, there is no option to do it, first user have to logout from his first facebook account in safari, and when he return back to the application only then user will get the Facebook login page to login again.

  2. when user tap FBLoginView it will open safari, but after tapping loginView, if user want to come back in the application without logging in, there is no option to do that.

  3. In posting action i am using FBWebDialog, if i have not logged in and try to open the FBWebDialog then in dialog it shows Facebook login page to login first, but after entering user info and password for Facebook it shows a message "An error occurred. please try again later." and in the dialog if we tap "Okay" button, it shows the user is logged in, but doesn't show the page to share content. really strange behavior.

Please Help!!!!!

Solution for question #3: Add @"app_id" with your App-ID to the params dictionary:

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               @"0123456789", @"app_id",
                               name, @"name",
                               caption, @"caption",
                               description, @"description",
                               link, @"link",
                               picture, @"picture",
                               nil];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM