Looking for a way to get only one random tweet with a specific hashtag from the specified user tweets.
I looked at the REST API documentation on Twitter, and it seemed that there was no API that could achieve this.
Even if you don't use the Twitter API, please let me know if there is a good way.
By the way, I am thinking about creating an Android app using the above.
android twitter
You can do this by throwing a search query containing a screen name and hashtag such as from:jack#ImWithKap
into the search API (search/tweets
) and randomly selecting the results.
However,
You need to be careful because there are restrictions such as .
(The former limitation can be avoided on the CK-only endpoint of the official app, but we will omit it here.)
The Search API—Twitter Developers
(It may be possible to scrap searches for external log services such as twilog on the assumption that you have already registered, but I don't recommend it.)
© 2024 OneMinuteCode. All rights reserved.