How do I get top tweeps by country?

twitter

Solution

You must search for tweets that include all those of interest, then loop over the results creating a count for each user. Your problem then becomes a simple case of ordering the results.

Since there is a maximum of 100 results per request (and circa 1500 per paginated results), you will almost certainly have to chunk the results by specifying `since_id` and/or `max_id` parameters.

If you wish to obtain tweets about your country of interest, you can search by place (you will first have to use the geo search API to identify the place ID of your country of interest; in the case of India, the place ID is b850c1bfd38f30e0).

If you wish to obtain tweets from within your country of interest, you can specify a `geocode` parameter consisting of a point within the country and a radius sufficiently large to encompass the remainder of the country. Both elements can be obtained as a one-off exercise in the following manner:

Identify a bounding polygon for the country of interest; these can be obtained from existing sources, for example from the CloudMade downloads site. In the case of India, the coordinates are available here.

Find the minimum bounding circle for the polygon's vertices, remembering to use geographical distance in the calculations.

If you wish to exclude tweets which are geotagged within the circle but outside the country's bounding polygon, for each resulting Tweet you must determine whether its `coordinates` lay within the polygon or not.

Problem

I want to know how to get top tweeps by country. ex : http://india.twirus.com/?category=india&freqtype=today Tweeps = twitter People ;) Ranking Logic : Top Mention profile for last 24hrs. *(You can also suggest me if you have any batter logic to get popular tweeps) I tried twitter API but not able to find this one. If there is no available api , you can also suggest possible logic.

Original source