How to tweet from Android app?

后端 未结 1 1528
南方客
南方客 2020-12-31 18:41

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 sample

相关标签:
1条回答
  • 2020-12-31 19:30

    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

    0 讨论(0)
提交回复
热议问题