如何检测注销事件与Facebook的Andr​​oid的API v4的? [英] How to detect logout event with the Facebook Android API v4?

查看:266
本文介绍了如何检测注销事件与Facebook的Andr​​oid的API v4的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我张贴在这里,因为我有一个问题。 我工作的一个新的Andr​​oid应用程序,我想知道我怎么可以检测当用户断开连接(Facebook的注销按钮),因为我想刷新我的用户界面在这一刻。

我一直在看着官方文档,但我什么也没找到。

解决方案

 你可以试试这个还
 如果(AccessToken.getCurrentAccessToken()!= NULL)
 {
   Log.v(用户登录,YES);

 }
其他
{
         Log.v(用户不登录,OK);
      LoginManager.getInstance()logInWithReadPermissions(WelcomeActivity1.this,(Arrays.asList(public_profile,user_friends,user_birthday,user_about_me,电子邮件)))。
 }
 

I post here because I've got a problem. I'm working on a new android application , and I want to know how I can detect when a user is disconnecting (facebook logout button), because I want to refresh my UI at this moment.

I have been watched the official documentation, but I found nothing.

解决方案

  You can try this also
 if(AccessToken.getCurrentAccessToken()!=null)
 {
   Log.v("User is login","YES");

 }
else
{
         Log.v("User is not login","OK");
      LoginManager.getInstance().logInWithReadPermissions(WelcomeActivity1.this, (Arrays.asList("public_profile", "user_friends","user_birthday","user_about_me","email")));
 }

这篇关于如何检测注销事件与Facebook的Andr​​oid的API v4的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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