Twitter的API:如何只搜索地理标记的鸣叫 [英] Twitter API: How to search only for geotagged tweets

查看:280
本文介绍了Twitter的API:如何只搜索地理标记的鸣叫的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用 Twitter的搜索API (或其他),以获得具有鸣叫的列表地理参数?

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

- 编辑 -

举例:我不会添加地理标记的鸣叫名单,由#apple标签。如果没有位置过滤器,全世界。

By example: I wont get list of geotagged tweets, by #apple tag. Without location filter, worldwide.

推荐答案

的流API允许你通过位置和搜索API来过滤允许您通过地理code进行搜索。你可以找到我们的开发者资源的网站,这些服务的更多信息。

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.

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

示例:创建一个名为位置的
  包含,不包括引号
  痕,那句话:
  位置= -122.75,36.8,-121.75,37.8,-74,40,-73,41,然后执行:

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:

卷曲-d @locations
  <一href=\"http://stream.twitter.com/1/statuses/filter.json\">http://stream.twitter.com/1/statuses/filter.json
  -uAnyTwitterUser:密码

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.

搜索API: http://dev.twitter.com/doc/get/search

例如: http://search.twitter.com/search.json?geo$c$c=37.781157,-122.398720,1mi

这篇关于Twitter的API:如何只搜索地理标记的鸣叫的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆