Facebook的登录使用对话框,并且不会原住民登录Android版 [英] Facebook Log In Using Dialog and Not Native Log In Android

查看:109
本文介绍了Facebook的登录使用对话框,并且不会原住民登录Android版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找如何使用Web对话框登录在Facebook上的做法。我与这方面的工作,使原生的Facebook应用程序[每当它被安装在设备],将不会受到影响。顺便说一句,我想要实现的是登录和使用对话框中使用Facebook的SDK版本3.谢谢!

I have been searching for the approach on how to log in in facebook using web dialog. I am working with this so that the native facebook app[whenever it is installed in the device], will not be affected. By the way, all I want to achieve is to log in using dialog using facebook sdk version 3. Thank you!

推荐答案

使用SDK 3.0,则需要通过OpenRequest做到这一点,是这样的:

With SDK 3.0, you need to do it via an OpenRequest, something like:

Session s = new Session(this);
Session.OpenRequest request = new Session.OpenRequest(this);
request.setCallback(new Session.StatusCallback() {...});
request.setLoginBehavior(SessionLoginBehavior.SUPPRESS_SSO); // <-- this is the important line
s.openForRead(request);
Session.setActiveSession(s);

这篇关于Facebook的登录使用对话框,并且不会原住民登录Android版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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