通过安装Twitter的应用程序没有浏览器的Andr​​oid twitter4j认证 [英] android twitter4j authentication via installed twitter app not browser

查看:189
本文介绍了通过安装Twitter的应用程序没有浏览器的Andr​​oid twitter4j认证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用twitter4j在我的Andr​​oid应用程序发布状态叽叽喳喳就像这个例子: <一href="http://www.androidhive.info/2012/09/android-twitter-oauth-connect-tutorial/">http://www.androidhive.info/2012/09/android-twitter-oauth-connect-tutorial/

i am using twitter4j in my android application to post status to twitter like in this example: http://www.androidhive.info/2012/09/android-twitter-oauth-connect-tutorial/

所有的工作不错,但问题是: 该认证是通过浏览器完成的..有什么办法来检测,如果Twitter的应用程序在移动已经安装,并通过其认证?

All is working good but the question is: The authentication is done via browser .. is there any way to detect if twitter app already installed on mobile and authenticate via it ?

感谢。

推荐答案

编辑:2014年11月27日

EDITED: November 27, 2014

微博最近发布的面料,它包括单点登录支持。从href="https://dev.twitter.com/twitter-kit/android/twitter-login" rel="nofollow">的

Twitter recently released Fabric that does include SSO support. From the Android docs:

在试图获得一个认证令牌,该工具包将使用本地安装的Twitter的应用程序提供单一登录体验。如果包是无法通过Twitter的应用程序来访问认证令牌,这回退到使用Web视图完成OAuth的过程。

When attempting to obtain an authentication token, the Kit will use the locally installed Twitter app to offer a single sign-on experience. If the Kit is unable to access the authentication token through the Twitter app, it falls back to using a web view to finish the OAuth process.

我的较早响应如下。

TL;博士 目前,SSO与Twitter无法在Android上。

tl;dr Currently, SSO with Twitter is not possible on Android.

更长的版本: 什么你基本上要求的是单点登录(SSO),类似于可与Facebook的SDK为Android。 Twitter已经从来不屑,甚至实施他们自己的图书馆为Android,更别说SSO。有一堆人谁问的开发论坛(这里和的这里),但标准的反应是,我引述,

Longer version: What you are basically asking for is Single sign-on (SSO), similar to what is available with the Facebook SDK for Android. Twitter has never bothered to even implement their own library for Android, let alone SSO. There are a bunch of people who have asked on the dev forums (here and here) but the standard response is, and I quote,

我们目前不提供针对Android SDK的一个紧密集成的相同水平可在iOS5的。

We do not currently offer a SDK for Android with the same level of tight integration as is available in iOS5.

Twitter需要先得到他们的Andr​​oid应用程序,支持单点登录。我会建议使用的Facebook 和的的Google+ 进行登录,而不是微博。

Twitter needs to first get their Android app to support SSO. I would suggest using Facebook and Google+ for login instead of Twitter.

这篇关于通过安装Twitter的应用程序没有浏览器的Andr​​oid twitter4j认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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