FB.Logout()在Facebook的UnitySDK不工作 [英] FB.Logout() not working in Facebook UnitySDK

查看:636
本文介绍了FB.Logout()在Facebook的UnitySDK不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功地使用 FB.Login 函数成功登录FB。现在,我要注销:

  FB.Logout();
的debug.log(FB被记录在+ FB.IsLoggedIn);

我期待上述code打印 FB.IsLoggedIn 的值设置为false,并问我的下一个<$ C登录名和密码$ C> FB.Login 。

在事实上的 FB.IsLoggedIn 的价值是真实的,我没有被登出:下次调用 FB.Login 不索要密码,我没有被登出时,我在浏览器中打开facebook网站。

我也尝试使用无证请求<$c$c>https://www.facebook.com/logout.php?next=[YourAppURL]&access_token=[ValidAccessToken]但它并没有任何影响我。

我怎么能注销用户的Facebook在我的独立统一的应用程序?

其实我需要的是用不同的用户名和密码进行登录。

也许我可以无效访问令牌在某种程度上,这将导致FB问我的用户名和密码一次?

任何帮助很多AP preciated。

SDK版本:5.0.1

生成版本:140401.725cc2ecbc9002a

统一版本4.3.3f1(c8ca9b6b9936)


解决方案

我不知道这是否是正确的,但为什么不只是做一些while循环?

\r
\r

的IEnumerator FBLogout(){\r
 FB.Logout();\r
 而(FB.IsLoggedIn){\r
  打印(注销);\r
  产量返回NULL;\r
 }\r
 打印(注销成功);\r
}

\r

\r
\r

I've managed to successfully log in FB using FB.Login function. Now I want to log out:

FB.Logout();
Debug.Log("FB IS LOGGED IN " + FB.IsLoggedIn);

I am expecting the above code to print the value of FB.IsLoggedIn as false and to ask me for a login and password on the next FB.Login.

In fact the value of FB.IsLoggedIn is true and I am not being logged out: next call to FB.Login does not ask for password and I am not being logged out when I open facebook site in my browser.

I've also tried to use the undocumented request to https://www.facebook.com/logout.php?next=[YourAppURL]&access_token=[ValidAccessToken] but it didn't make any effect for me.

How can I log the user out of facebook in my standalone unity application?

In fact what I need is to log in with different login and password.

Maybe I can invalidate the access token somehow which will cause the FB to ask me for login and password again?

Any help is much appreciated.

SDK version: 5.0.1

Build version: 140401.725cc2ecbc9002a

Unity Version 4.3.3f1 (c8ca9b6b9936)

解决方案

I'm not sure if it is correct but why not just do some while loop?

IEnumerator FBLogout (){
 FB.Logout ();
 while (FB.IsLoggedIn){
  print ("Logging Out");
  yield return null;
 }
 print ("Logout Successful");
}

这篇关于FB.Logout()在Facebook的UnitySDK不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆