How to tweet using twitter api?

匿名 (未验证) 提交于 2019-12-03 08:28:06

问题:

I am developing an app in which User can tweet some predefined text. I have read many of tutorials but could not find the proper solution .Can any body please help me to do this via some tutorials or some example.

回答1:

Use twitter4j. It works with Android. There are some usage examples.

A direct example on how to tweet on Android (assumes a Twitter account is available on device which means a Twitter client is present): http://blog.radioactiveyak.com/2011/04/using-twitter4j-to-tweet-in-android.html



回答2:

Thanks Every body for support all the tutorial I have read are very good .But that was my mistake .I have not given the read and write permission in developer account . Now I have done it.



回答3:

If you want to save yourself from the hassles of using twitter4j api where the use of oAuth etc. is required, you can try using a web-intent in a WebView shown in a dialog. Have a look on the following tutorial https://dev.twitter.com/docs/intents

You will be able to tweet once the username and password has been entered and saved. Although the use of Web-Intent might be discouraged, but it's easiest hack you can try.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!