开发者

Get Twitter trends when specifying a WOEID

Hi all i would like to get 开发者_JAVA技巧a list of trending topic from a specific country.

You can look at the documentation here.

The format of the feed is

api.twitter.com/1/trends/woeid.format

When searching for trends in London(WEOIP=44418) it works perfectly.

api.twitter.com/1/trends/44418.json

But for some reason it does not work for South Africa(WEOIP=23424942)

api.twitter.com/1/trends/23424942.json


Trending data is available for certain countries, but it is not available for South Africa.

There is a list of available locations (which may be out of date, posted on February 4, 2010) at the bottom of this blog post: https://blog.twitter.com/engineering/en_us/a/2010/woeids-in-twitters-trends.html


Twitter API provides a method to get available locations for trending topics. You should first fetch those available locations and then make a request to load trending topics for one of those locations by specifying its WOEID. See Twitter API reference for available locations.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜