如何打开Facebook的身份验证对话框每一次? [英] How to Open Facebook auth dialog every time?

查看:176
本文介绍了如何打开Facebook的身份验证对话框每一次?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ParseFacebookUtils通过Facebook登录,这个code I成功登录通过Facebook,并获得用户的所有数据。

I am using ParseFacebookUtils to login through facebook,with this code i successfully logged in through Facebook and got all data of user.

但是,如果Facebook原生应用程序安装在我的手机Facebook的身份验证对话框不叫,每次和用户去为空的条件。见下code,我用:

But if Facebook native application is installed on my phone facebook auth dialog is not called every time and went in User is null condition. See following code i used :

    ParseFacebookUtils.logIn(Arrays.asList(Permissions.Friends.ACTIVITIES),
                    this, new LogInCallback() {

                @Override
                public void done(ParseUser user, ParseException e) {

                    if(user == null){

System.out.println(" Here");    

                    }else if(user.isNew()){

                    }else{

    }

但我想每一个将返回我任何时候ParseUser Facebook的打开对话框权威性。
如何实现这种funcationality的?

But i want to open Facebook auth dialog every time that will return me any ParseUser. How to achieve this kind of funcationality ?

请注意:


  1. 我检查我的Facebook KeyHash和Facebook的AppID是正确的。

  2. 我用的Facebook SDK 3.0和SDK解析1.2.3

我不知道如何在我的应用程序实现这一点。

I dont know how to achieve this IN my application

推荐答案

试试这个:

Session session = ParseFacebookUtils.getSession();
if (session != null)
    session.closeAndClearTokenInformation();

ParseUser.logOut();

这将完成柯伦机器在你的Facebook会话。下一次,当你登录RY - 将出现˚F登录对话框

This will finish your Facebook session on curren machine. Next time when you ry login - F login dialog will appear.

这篇关于如何打开Facebook的身份验证对话框每一次?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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