简体   繁体   English

Android版单点登录

[英]Single Sign On for Android Facebook

Friends, 朋友们,
I need to know much about Single Sign On support for Facebook. 我需要了解有关Facebook的单点登录支持。 I have two applications on my device and I have to post the feed. 我的设备上有两个应用程序,我必须发布提要。 I login the very first time from either one of the applications, but I need it to continue using the same login credential and session for the other application without showing the login page. 我是第一次从其中一个应用程序登录,但我需要它继续使用相同的登录凭据和其他应用程序的会话而不显示登录页面。 Is this possible in android? 这在Android中是否可行? If so please guide me how to implement it. 如果是这样,请指导我如何实施它。

Thanks in advance. 提前致谢。

Make sure both apps reference the same Facebook app client_id and client_secret . 确保两个应用程序引用相同的Facebook应用程序client_idclient_secret Once the user authorizes one of your Android apps, store their access_token , and share it between both apps. 用户授权您的某个Android应用后,请存储其access_token ,并在两个应用之间共享。

Perhaps see 或许看

Preserving login session across multiple Android apps 保留跨多个Android应用的登录会话

and then 然后

Write a private access file to another app's files directory 将私有访问文件写入另一个应用程序的文件目录

My solution is to write the login information (I guess access_token ) to a file on both apps and make each app check it's file and the other app's file modification time. 我的解决方案是将登录信息(我猜是access_token )写入两个应用程序上的文件,并让每个应用程序检查它的文件和其他应用程序的文件修改时间。 the one modified most recent wins. 一次修改最近的胜利。

You would have to write up some code for that.. 你必须为此编写一些代码..

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

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