Android的不同账户(Gmail中,Twitter等)登录 [英] Android sign in with different accounts (Gmail, Twitter, etc)

查看:274
本文介绍了Android的不同账户(Gmail中,Twitter等)登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发具有用户名和密码登录屏幕的应用程序。现在,我想让他们的帐户与Gmail,Facebook,Twitter和链接在用户登录。没有人有任何想法或链接,可以提供我登录的说明上述第三方API?

I developing an app which has the login screen with username and password. Now I want to let the user login with their account with Gmail, Facebook, Twitter and Linked In. Does anyone have any idea or links that can provide me the description of login with above third party API?

推荐答案

一般来说,不同的服务认证的过程是这样的:

Generally, the process of authentication with different services goes like this:


  • 您请求 AUTH_TOKEN 从服务。

您发送该 AUTH_TOKEN 到你的服务器,要么创建的所有信息的新用户,你都不可能从服务中获得(姓名,电子邮件,位置等等),或者你,如果他已经存在于数据库中的现有用户进行合并。

You send this AUTH_TOKEN to your server and either create a new user with all the information that you can possibly get from the service (name, email, location etc.) or you merge it with an existing user if he already exists in the database.

当用户在将来登录,你就会知道他是否 AUTH_KEY 对应于数据库的用户或没有。

When the user logs in in the future, you'll know whether his AUTH_KEY corresponds to a user in the database or not.

现在的API的Twitter并可以使用 Twitter4j ,对于Facebook,你可以用自己的官方SDK 这是真正的移动体验进行了优化。对于剩下的,我不知道任何Android SDK,所以你也许可以既可以使用春天社会作为@Darko mentionned或使用他们的 REST API的直接。

Now for the APIs, for Twitter you can use Twitter4j, for Facebook you can use their official SDK which are really optimized for a Mobile experience. For the rest, I am not aware of any Android SDK, so you can probably either use Spring Social as @Darko mentionned or use their REST APIs directly.

这篇关于Android的不同账户(Gmail中,Twitter等)登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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