Android Intent跟随Twitter用户?

Mar*_*ark 6 twitter android android-intent

在我的关于屏幕中,我想允许用户轻松"关注"我的Twitter帐户.

我希望现有的Twitter应用程序支持某种Intent.我宁愿不在这里使用这个建议,因为这需要身份验证,AFAICT.

例如,如果用户已经安装了官方Twitter应用程序,那么在必要时,最好在该应用程序内完成任何身份验证.

我之前曾尝试联系官方Twitter应用程序背后的人,但没有得到回应.

Mar*_*ark 5

我刚刚使用标准的基于http的Intent:

行动:

android.intent.action.VIEW
Run Code Online (Sandbox Code Playgroud)

数据:

http://twitter.com/mytwitterusername
Run Code Online (Sandbox Code Playgroud)

然后,用户可以选择是否在官方Twitter应用程序(或其他)中打开Intent,并轻松地从那里关注mytwitterusername.


Bor*_*per 5

这是一个老问题,但我相信现在这是一个更好的方法.使用Web Intent.

https://dev.twitter.com/web/follow-button/web-intent

基本上只需使用带有URL的ACTION_VIEW:https://twitter.com/intent/follow?user_id = < the userid >