Twitter API: How to search only for geotagged tweets

后端 未结 5 1011
傲寒
傲寒 2021-02-01 18:27

How can I use Twitter Search API (or other) to get a list of tweets which have the \"geo\" param?

--EDIT--

By example: I wont get list

5条回答
  •  终归单人心
    2021-02-01 18:52

    The streaming API allowed you to filter by a location and the search API allows you to search by geocode. You can find more information on these services on our developer resources site.

    Streaming API: http://dev.twitter.com/pages/streaming_api

    Example: Create a file called ‘locations’ that contains, excluding the quotation marks, the phrase: “locations=-122.75,36.8,-121.75,37.8,-74,40,-73,41” then execute:

    curl -d @locations http://stream.twitter.com/1/statuses/filter.json -uAnyTwitterUser:Password.

    You will receive all geo tagged tweets from the San Francisco and New York City area.

    Search API: http://dev.twitter.com/doc/get/search

    Example: http://search.twitter.com/search.json?geocode=37.781157,-122.398720,1mi

提交回复
热议问题