仅从 Twitter API 请求地理标记状态 [英] Requesting just geotagged statuses from the Twitter API

查看:14
本文介绍了仅从 Twitter API 请求地理标记状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何让 twitter API 只给我带有地理标记的状态?我目前正在过滤,但更友好"会更有意义

How can I ask the twitter API to give me just geotagged statuses? I'm currently filtering but it would make more sense to be more 'friendly'

推荐答案

似乎你应该能够使用 流媒体 API 和位置过滤器,只需将边界框设置为覆盖整个地球:

Seems like you should be able to do this with the streaming API and a location filter, just set the bounding box to cover the whole earth:

与跟踪参数一样,查询受跟踪限制(在跟踪限制中描述)和访问角色(在状态/过滤器方法中描述)的约束.边界框的数量和大小都是有限的.边界框最多可以是经度 360 度乘纬度 180 度,您最多可以指定 25 个边界框.一个 360 度乘 180 度的盒子将覆盖整个地球.更高的访问级别提供额外的边界框.

Just as with the track parameter, queries are subject to Track Limitations, described in Track Limiting and subject to access roles, described in the statuses/filter method. Both the number and size of bounding boxes is limited. Bounding boxes can be up to 360 degrees longitude by 180 degrees latitude, and you may specify up to 25 bounding boxes. A box of 360-degrees by 180-degrees will cover the whole earth. Higher access levels provide additional bounding boxes.

因为:

只有使用地理标记 API 创建并放置在跟踪边界框内的推文才会包含在流中 - 用户的位置字段不用于过滤推文(例如,如果用户将其位置设置为旧金山",但这条推文不是使用地理标记 API 创建的,也没有地理元素,因此不会包含在流中).

Only tweets that are both created using the Geotagging API and are placed from within a tracked bounding box will be included in the stream – the user’s location field is not used to filter tweets (e.g. if a user has their location set to "San Francisco", but the tweet was not created using the Geotagging API and has no geo element, it will not be included in the stream).

然后您应该获得基本上所有地理标记状态.

You should then be getting essentially all geotagged statuses.

这篇关于仅从 Twitter API 请求地理标记状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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