- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Twitter Stream API 是否可以通过位置字段过滤推文?正如您在下面的示例 JSON 条目中看到的,有“location”:“philippines”字段 - 值。现在,我想要的只是通过位置字段过滤来自该位置的推文。但请不要误会我的意思。我不是在谈论 GEO 标签过滤器。
这可能吗?
{"geo":null,"in_reply_to_screen_name":null,"truncated":false,"text":"RT @BreakingNewsPH: Typhoon hits Taiwan after pummeling Philippines: Typhoon Nanmadol slammed into\u2026 http:\/\/t.co\/rF3jbVU #breakingnews","in_reply_to_user_id_str":null,"contributors":null,"retweeted":false,"retweet_count":1,"entities":{"hashtags":[{"text":"breakingnews","indices":[120,133]}],"urls":[{"indices":[100,119],"display_url":"goo.gl\/fb\/JVdpj","expanded_url":"http:\/\/goo.gl\/fb\/JVdpj","url":"http:\/\/t.co\/rF3jbVU"}],"user_mentions":[{"indices":[3,18],"name":"Breaking News PH","screen_name":"BreakingNewsPH","id":190144401,"id_str":"190144401"}]},"coordinates":null,"retweeted_status":{"geo":null,"in_reply_to_screen_name":null,"truncated":false,"text":"Typhoon hits Taiwan after pummeling Philippines: Typhoon Nanmadol slammed into\u2026 http:\/\/t.co\/rF3jbVU #breakingnews","in_reply_to_user_id_str":null,"contributors":null,"retweeted":false,"retweet_count":1,"entities":{"hashtags":[{"text":"breakingnews","indices":[100,113]}],"urls":[{"indices":[80,99],"display_url":"goo.gl\/fb\/JVdpj","expanded_url":"http:\/\/goo.gl\/fb\/JVdpj","url":"http:\/\/t.co\/rF3jbVU"}],"user_mentions":[]},"coordinates":null,"place":null,"source":"\u003Ca href=\"http:\/\/www.google.com\/support\/youtube\/bin\/answer.py?hl=en&answer=164577\" rel=\"nofollow\"\u003EGoogle\u003C\/a\u003E","created_at":"Mon Aug 29 04:16:31 +0000 2011","in_reply_to_user_id":null,"user":{"listed_count":19,"favourites_count":0,"profile_sidebar_fill_color":"252429","location":"Philippines","profile_background_tile":false,"lang":"en","profile_link_color":"2FC2EF","description":"Follow us to receive round-the-clock Philippine Breaking News updates directly on your Twitter account!","default_profile_image":false,"default_profile":false,"verified":false,"profile_sidebar_border_color":"181A1E","notifications":null,"time_zone":"Hong Kong","created_at":"Mon Sep 13 05:14:02 +0000 2010","followers_count":804,"following":null,"profile_use_background_image":true,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme9\/bg.gif","profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/1130204413\/breakingnewsph-logo-small_normal.png","show_all_inline_media":false,"follow_request_sent":null,"geo_enabled":false,"profile_background_color":"1A1B1F","protected":false,"contributors_enabled":false,"profile_background_image_url":"http:\/\/a1.twimg.com\/images\/themes\/theme9\/bg.gif","url":"http:\/\/www.breakingnews.ph","screen_name":"BreakingNewsPH","name":"Breaking News PH","friends_count":210,"profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1130204413\/breakingnewsph-logo-small_normal.png","id":190144401,"id_str":"190144401","is_translator":false,"statuses_count":51981,"utc_offset":28800,"profile_text_color":"666666"},"in_reply_to_status_id":null,"favorited":false,"id":108030240370073602,"possibly_sensitive":false,"in_reply_to_status_id_str":null,"id_str":"108030240370073602"},"place":null,"source":"web","created_at":"Mon Aug 29 04:23:44 +0000 2011","in_reply_to_user_id":null,"user":{"listed_count":0,"favourites_count":1,"profile_sidebar_fill_color":"FFF7CC","location":"cabuyao,Laguna PHILIPINES","profile_background_tile":false,"lang":"en","profile_link_color":"FF0000","description":"Prudence keeps life safe, but it does not often make it happy.","default_profile_image":false,"default_profile":false,"verified":false,"profile_sidebar_border_color":"F2E195","notifications":null,"time_zone":"Alaska","created_at":"Sun Nov 14 09:15:11 +0000 2010","followers_count":32,"following":null,"profile_use_background_image":true,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/188170056\/Picture_276.jpg","profile_image_url":"http:\/\/a2.twimg.com\/profile_images\/1423110432\/271010_220561634650699_100000905924979_647505_1229915_n_normal.jpg","show_all_inline_media":true,"follow_request_sent":null,"geo_enabled":false,"profile_background_color":"BADFCD","protected":false,"contributors_enabled":false,"profile_background_image_url":"http:\/\/a1.twimg.com\/profile_background_images\/188170056\/Picture_276.jpg","url":null,"screen_name":"emerlyn14","name":"Emerlyn Cantalejo","friends_count":215,"profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1423110432\/271010_220561634650699_100000905924979_647505_1229915_n_normal.jpg","id":215568114,"id_str":"215568114","is_translator":false,"statuses_count":270,"utc_offset":-32400,"profile_text_color":"0C3E53"},"in_reply_to_status_id":null,"favorited":false,"id":108032058986729472,"possibly_sensitive":false,"in_reply_to_status_id_str":null,"id_str":"108032058986729472"}
最佳答案
检查 Twitter 流 API https://dev.twitter.com/docs/streaming-api/methods#locations
locations
Specifies a set of bounding boxes to track. 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). Bounding boxes are specified as a comma separate list of longitude/latitude pairs, with the first pair denoting the southwest corner of the box. For example locations=-122.75,36.8,-121.75,37.8 would track tweets from the San Francisco area. Multiple bounding boxes may be specified by concatenating latitude/longitude pairs, for example: locations=-122.75,36.8,-121.75,37.8,-74,40,-73,41 would track tweets from San Francisco and New York City.
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.
Bounding boxes are logical ORs. A locations parameter may be combined with track parameters, but note that all terms are logically ORd, so the query string track=twitter&locations=-122.75,36.8,-121.75,37.8 would match any tweets containing the term Twitter (even non-geo tweets) OR coming from the San Francisco area.
Values: longitude/latitude pairs, separated by commas. The first pair specifies the southwest corner of the box. Methods: statuses/filter
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 https://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.
关于filter - Twitter 流按位置过滤,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7226149/
用户使用 oauth 登录我的应用程序,注销我的应用程序后,但 twitter 无法执行,问题是用户 twitter 帐户处于事件状态。 当注销我的应用程序的同时注销 Twitter twitter
我在 Twitter 的文本查询字符串参数方面遇到了一些字符编码问题。 a) http://www.twitter.com/share?url=http://www.example.com&text=
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引起辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the he
我正在尝试执行3-legged authorization来在浏览器中调用Twitter API。该过程首先通过将签名的请求发布到 /oauth/request_token 来获得请求 token (
我正在做一个项目来识别用户是否是 Twitter 中的名人。有什么方法可以检查 Twitter 中的用户是否被验证为名人?我知道名人会在推特个人资料中用蓝色徽章来识别。但是我如何通过 Twitter
我想对推文进行一些挖掘。是否有更具体的推文停用词列表,例如删除“lol”和其他推特笑脸? 最佳答案 我想你应该合并普通的停用词列表,例如 this one或that ,带有特定的首字母缩略词词典,例如
我正在为我的期末项目建立一个网站,用于查找和显示 Twitter 上当前 HitTest 门的主题。有谁知道如何从上周或一天内的大量推文中提取主题?我还想知道如何在 http://tweet3d.co
我可以使用获取所有用户的详细信息 https://api.twitter.com/1/account/verify_credentials.json 但我只想通过使用 api 获取 ID 如何获得它。
我见过多个“允许此应用程序与 twitter 一起运行”的内容,但没有一个: 查看您的 Twitter 密码 在“此应用程序将能够”下 示例: 最佳答案 没有 Twitter 永远不会允许人们看到您的
我注意到最近的一些推文有与之相关的媒体,例如来自 TwitPic 或 Flickr 的照片以及来自 Youtube 的视频。你可以直接在 Twitter 网站上看到它们,所以它不仅仅是一个链接。我的想
在 Twitter API 中,有一个 status_lookup 方法可以“水化”推文。文档不清楚这意味着什么。那么我什么时候需要补充推文呢? 如果我有来自 /statuses/user_timel
我使用以下代码来显示一个带有已填充消息的 Twitter 框的页面: Click me 但是,在页面上,我在 Twitter 框中得到了这个: myMessage/ 注意结尾的斜杠。有什么想法可以解决
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎与 help center 中定义的范围内的编程无关。 . 关闭 7 年前。 Improve
在开发包含 Twitter 客户端的 iOS 应用程序时,我必须允许用户生成主题标签(可以在应用程序内的其他位置创建,而不仅仅是在推文正文中创建)。 我想确保任何此类主题标签对于 Twitter 都有
我是集群新手,之前刚刚实现了一些算法。我需要根据推文的相似性对推文进行聚类。一种方法是仅使用哈希标签,但我认为这不会提供那么多信息。因此应该分析完整的推文。 此外,我还在网上搜索聚类提要的算法。 我遇
我想在 ios 7 中集成 twitter 并希望实现以下功能。1. 从 iOS 应用程序使用 Twitter 登录。2. 获取用户资料信息 我尝试了几个解决方案,但没有一个对我有用。请帮忙。 最佳答
是否有任何方法可以使用用户 ID 或屏幕名称构建个人资料图像 URL?我将用户 ID 存储在数据库中,但我不想存储个人资料图像 url。 编辑: 我也不想进行 api 调用。我想将 user_id 放
在 iOS5 上,是否可以提示用户并将其引导至 Twitter Settings.app 区域,以便他们可以将自己的 Twitter 帐户添加到手机中?如果是,你是怎么做到的? 作为解决方法,我可以指
有许多网站为 Twitter 提供附加服务: hashtags.org tweetmeme.com repeets.com dailyrt.com backtweets.com 他们都有一个共同点:他
我正在使用 Twitter Bootstrap 并尝试使用背景打印页面。 我尝试了网络浏览器中的所有选项,但它不起作用。 如果我不包括 twitter bootstrap,则背景的打印效果很好。 (顺
我是一名优秀的程序员,十分优秀!