如何从Android应用程序鸣叫? [英] How to tweet from Android app?

查看:203
本文介绍了如何从Android应用程序鸣叫?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个Android应用程序,并希望有发送邮件在我的Twitter帐户(鸣叫)的功能。哪些API可用于这个? code样品将AP preciated。

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.

推荐答案

如果你只需要发送鸣叫,这可以帮助你。

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));

如果你想知道哪些参数是可用,检查此链接 https://dev.twitter.com/docs/tweet-button

If you want to know which parameters are available, check this link https://dev.twitter.com/docs/tweet-button

这篇关于如何从Android应用程序鸣叫?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆