bne*_*gel 23 api twitter search
我如何使用Twitter Search API(或其他)获取具有该"geo"参数的推文列表?
- 编辑 -
例如:我不会通过#apple标签获得地理标记的推文列表.没有位置过滤器,全世界.
ask*_*der 12
看起来最新的API支持; 只需使用足够大的地理区域进行查询:
-180,-90,180,90
Run Code Online (Sandbox Code Playgroud)
有关过滤器和位置的API链接,请参阅更多信息
流API允许您按位置进行过滤,搜索API允许您按地理位置进行搜索.您可以在我们的开发人员资源站点上找到有关这些服务的更多信
流API:http://dev.twitter.com/pages/streaming_api
示例:创建一个名为"locations"的文件,其中包含不包括引号的短语:"locations = -122.75,36.8,-121.75,37.8,-74,40,-73,41"然后执行:
curl -d @locations http://stream.twitter.com/1/statuses/filter.json -uAnyTwitterUser:密码.
您将收到来自旧金山和纽约市区的所有地理标记的推文.
搜索API:http://dev.twitter.com/doc/get/search
例:
http://search.twitter.com/search.json?geocode=37.781157,-122.398720,1mi
从Twitter API文档中,这应该是您的搜索查询的格式:
http://search.twitter.com/search.json?geocode=37.781157,-122.398720,1mi
Run Code Online (Sandbox Code Playgroud)
37.781157纬度在哪里,-122.398720是经度,1mi是在其中搜索的半径.
| 归档时间: |
|
| 查看次数: |
29099 次 |
| 最近记录: |