简体   繁体   中英

View user's twitter feed in Twitter app?

I have a user's twitter handle. 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? I'm not sure if the author's of the Twitter app have exposed any such intent,

Thanks

AFAIK, the Twitter app is undocumented from the standpoint of developer integration like this.

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. All you need is their user timeline API call ( 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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