Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tweet from Android app?

I am developing an Android application and would like to have the functionality to send message on my twitter account (TWEET). Which APIs are available for this? Code samples will be appreciated.

like image 916
user718592 Avatar asked Apr 21 '11 08:04

user718592


People also ask

Does Twitter have an Android app?

The Twitter for Android app is available for phones running Android OS versions 7.93. 4 and above.


1 Answers

If you just need to send a tweet, this can help you.

String tweetUrl = "https://twitter.com/intent/tweet?text=PUT TEXT HERE &url="
                        + "https://www.google.com";
Uri uri = Uri.parse(tweetUrl);
startActivity(new Intent(Intent.ACTION_VIEW, uri));

If you want to know which parameters are available, check this link https://developer.twitter.com/en/docs/twitter-for-websites/tweet-button/guides/parameter-reference1

like image 96
gian1200 Avatar answered Oct 04 '22 08:10

gian1200