从其他应用程序Twitter的应用程序打开页面 - 机器人应用程序、机器人、页面、Twitter

2023-09-06 13:19:36 作者:雪在下、心微凉

我一直在寻找一些方法来启动Twitter的应用程序,并从我的aplication打开指定的网页,没有web视图。 我发现Facebook上的解决方案在这里: Opening在指定的个人资料页面的Facebook应用程序

I was looking for some way to launch Twitter app and open a specified page from my aplication, without webview. I found the solution for Facebook here: Opening facebook app on specified profile page

我需要类似的东西。

非常感谢你。

修改 我只是找到了一个解决办法:

EDIT I just found a solution:

try {
Intent intent = new Intent(Intent.ACTION_VIEW,
    Uri.parse("twitter://user?screen_name=[user_name]"));
startActivity(intent);

}catch (Exception e) {
    startActivity(new Intent(Intent.ACTION_VIEW,
         Uri.parse("https://twitter.com/#!/[user_name]"))); 
} 

感谢您的意见。

Thanks for your comments.

推荐答案

这工作对我来说:微博://用户USER_ID = ID_NUM

要知道ID: http://www.idfromuser.com/