简体   繁体   English

iOS中Facebook SDK中的FBWebDialog和注销问题

[英]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. 我在iPhone应用程序中使用Facebook SDK 3.2,我已经使用FBLoginView从Facebook登录和注销。 and two buttons: first to post content on user's wall and second to post content on Friend's wall. 和两个按钮:第一个按钮将内容发布在用户的墙上,第二个按钮将内容发布在Friend的墙上。 In both i am using FBWebDialog. 我都在使用FBWebDialog。 when user starts application login page opens (in safari) and everything works fine. 当用户启动时,应用程序登录页面打开(在Safari中),一切正常。

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. 如果用户要使用另一个Facebook ID登录,则无法选择,第一个用户必须从其在safari中的第一个Facebook帐户注销,并且当他仅返回该应用程序时,该用户将获得Facebook登录页面进行登录再次。

  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. 当用户点击FBLoginView时,它将打开safari,但是在点击loginView后,如果用户希望不登录而返回应用程序,则没有选择。

  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." 在发布操作中,我使用的是FBWebDialog,如果我尚未登录并尝试打开FBWebDialog,则在对话框中显示Facebook登录页面先登录,但在输入用户信息和Facebook密码后,它显示一条消息“发生了错误。请稍后再试。” 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: 问题3的解决方案:将@“ app_id”和您的App-ID添加到params字典中:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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