从其他应用程序打开 Twitter 应用程序中的页面

编程入门 行业动态 更新时间:2024-10-26 19:26:05
本文介绍了从其他应用程序打开 Twitter 应用程序中的页面 - Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找某种方法来启动 Twitter 应用程序并从我的应用程序打开指定页面,而无需 webview.我在这里找到了 Facebook 的解决方案:在指定的个人资料页面上打开 Facebook 应用

I was looking for some way to launch Twitter app and open a specified page from my application, 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/#!/[user_name]"))); 
}

推荐答案

这对我有用:twitter://user?user_id=id_num

这篇关于从其他应用程序打开 Twitter 应用程序中的页面 - Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-03-31 16:39:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/808881.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   页面   Twitter

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!