Android intent在应用程序中打开特定twitter

Android intent在应用程序中打开特定twitter,android,android-intent,twitter,Android,Android Intent,Twitter,有一种方法可以知道您想要打开的特定twitter的id,以便能够在官方应用程序中打开它 我记得我很久以前就找到了它,但我记不得了 我想这是一个类似的事情,但我不记得了 Intent appIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("twitter://...?tweet_id=" + id)); appIntent.setPackage("com.twitter.android"); 要启动twitter用户源,请执行以下

有一种方法可以知道您想要打开的特定twitter的id,以便能够在官方应用程序中打开它

我记得我很久以前就找到了它,但我记不得了

我想这是一个类似的事情,但我不记得了

   Intent appIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("twitter://...?tweet_id=" + id));
    appIntent.setPackage("com.twitter.android");

要启动twitter用户源,请执行以下操作:

Intent intent = null;
try {
    // get the Twitter app if possible
    this.getPackageManager().getPackageInfo("com.twitter.android", 0);
    intent = new Intent(Intent.ACTION_VIEW, Uri.parse("twitter://user?user_id=USERID"));
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
} catch (Exception e) {
    // no Twitter app, revert to browser
    intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://twitter.com/USERID_OR_PROFILENAME"));
}
this.startActivity(intent);

你能具体说明你需要什么帮助吗?