Retrieve most retweeted tweets for a given hashtag

前端 未结 2 1054
無奈伤痛
無奈伤痛 2021-02-06 03:13

I\'d like to retrieve the tweets for given a hashtag and sort them from the most retweeted to the less retweeted.

The closest thing I\'ve found is using the search call

相关标签:
2条回答
  • 2021-02-06 04:03

    This isn't a programmatic method but rather works in the browser with a chrome extension (HackyBird) :

    • Install the extension
    • Search for a phrase e.g. #Social (twitter.com/search?q=%23Social)
    • Click the extension to sort it (you can adjust the ratio of retweets/likes used for sorting in extension options).

    P.S. It'll also sort your or any other user's timeline.

    0 讨论(0)
  • 2021-02-06 04:09

    Results will sometimes contain a result_type field into the metadata with a value of either "recent" or "popular". Popular results are derived by an algorithm that Twitter computes, and up to 3 will appear in the default mixed mode that the Search API operates under. Popular results include another node in the metadata called recent_retweets. This field indicates how many retweets the Tweet has had.

    Source (Emphasis are mine)

    Just call with result_type=popular and check the recent_retweets node to see how popular it is. result_type=popular will become the default in an upcome release so beware if you omit this parameter.

    Results with popular tweets aren't ordered chronologically. *

    If you would like to always have results to show, use result_type=mixed: they will have the result_type in the "metadata" section with a value of "recent", and popular results will have "popular". A small reference about result_types:

    mixed: Include both popular and real time results in the response.

    recent: return only the most recent results in the response

    popular: return only the most popular results in the response.

    If a search query has any popular results, those will be returned at the top, even if they are older than the other results. *

    *[Twitter API Announcements]

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