i want to know about twitter api for android application.... please send me link or source for twitter api which api just only for send the tweet....
While not rate limited by the API, a user is limited in the number of Tweets they can create at a time. If the number of updates posted by the user reaches the current allowed limit this method will return an HTTP 403 error.
You can do application-only authentication using your apps consumer API keys, or by using a App only Access Token (Bearer Token). This means that the only requests you can make to a Twitter API must not require an authenticated user.
First, log in to the Twitter developer's portal with the account from which you want to post a tweet. Then click on the "Developer Portal" link in the upper right corner. Once you enter it, click on "Projects & Apps" -> "Overview" -> "Create App".
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));
For more info, check my answer on this other post
How to tweet from Android app?
To share some text using standard android intents, only three lines of code are necessary. The user will be prompted to pick a method (and they can then choose Twitter.)
Intent share = new Intent(Intent.ACTION_SEND);
share.putExtra(Intent.EXTRA_TEXT, "Here's some text for Twitter.");
startActivity(Intent.createChooser(share, "Share this via"));
If you want to do more advanced stuff with Twitter:
I found that a lot of the solutions posted on the Internet were needlessly complicated. For me, it was only a couple additional lines of code beyond what Twitter4J tells you to do.
For my dollar, Stephan's answer here is the best.
I have some example code on github using his technique, here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With