简体   繁体   English

在Twitter应用中查看用户的Twitter提要?

[英]View user's twitter feed in Twitter app?

I have a user's twitter handle. 我有一个用户的Twitter句柄。 Right now I'm opening it through a web page like: 现在,我正在通过如下网页打开它:

String url = "http://www.twitter.com/" + "example_handle";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(intent);

If the user has the Twitter android app installed, is there a different intent I can use which gives the user the option to view that user's twitter feed in the Twitter app, instead of forcing them directly to a browser? 如果用户安装了Twitter android应用程序,我是否可以使用其他意图,使用户可以选择在Twitter应用程序中查看该用户的Twitter提要,而不是将其直接强制到浏览器? I'm not sure if the author's of the Twitter app have exposed any such intent, 我不确定Twitter应用程序的作者是否暴露了任何此类意图,

Thanks 谢谢

AFAIK, the Twitter app is undocumented from the standpoint of developer integration like this. 从这样的开发人员集成的角度来看,Twitter应用程序AFAIK未被记录。

We were told that it would be released as open source. 我们被告知它将作为开源发布。 It is possible that, at that time, they will also document integration strategies for this. 到那时,他们可能还会记录与此相关的集成策略。

You could write a small Twitter reader and show it in your own app. 您可以编写一个小型Twitter阅读器,然后在自己的应用程序中显示它。 All you need is their user timeline API call ( http://dev.twitter.com/doc/get/statuses/user_timeline ). 您只需要他们的user timeline API调用( http://dev.twitter.com/doc/get/statuses/user_timeline )。 This would be a good usability choice since users wouldn't have to leave your app. 这将是一个很好的可用性选择,因为用户不必离开您的应用程序。 Only thing to remember: the amount of utility you gain by including this functionality is dependent on why you are sending the user to Twitter in the first place. 唯一要记住的是:通过包含此功能而获得的实用工具数量取决于首先将用户发送到Twitter的原因。

使用Twitter4j(Java库)之类的库来检索用户的最新Tweet时间轴确实非常容易-我已经在我的博客http://automateddeveloper.blogspot.com/2011/上为此类应用程序完成了教程(包括源代码)。 05 / android-twitter-reader.html-希望对您有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM