本文介绍了在即将到来的更新后,如何通过 PHP 获取 Twitter 共享计数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Twitter 刚刚宣布他们将关闭私有 JSON 端点.然而,他们提到使用这两个其他来源收集 Twitter 数据:

Twitter just announced that they are closing the private JSON endpoints. However they mentioned using these two other sources to collect Twitter data:

https://dev.twitter.com/rest/reference/get/搜索/推文http://support.gnip.com/apis/search_full_archive_api/overview.html

这些(或其他一些来源)中的任何一个都可以用来收集 URL 的 Twitter 共享计数吗?如果是这样,如何?

Can either of these (or some other source) be used to collect the Twitter share count of a URL? If so, how?

推荐答案

Twitter 的搜索界面可用于查找链接到 URL 的推文,方法是将其搜索为不带 http[s]:/的带引号的字符串/www. 前缀:

Twitter's search interface can be used to find tweets linking to a URL, by searching for it as a quoted string without the http[s]://www. prefix:

https://twitter.com/search?f=tweets&q="bbc.co.uk/programmes/b039ctgc"

搜索结果中的推文数量,加上每个转推的数量,应该与前一个分享计数"网址返回的数量相似.

The number of tweets in the search results, plus the count of each of their retweets, should give a similar count to that returned by the previous "share count" URL.

注意:有一些注意事项,例如它不是真正的 URL 搜索,因此碰巧包含相同字符串的类似 URL 也会匹配并包含在搜索结果中.

Note: there are caveats, such as it not being a true URL search, so a similar URL that happens to contain the same string will also match and be included in the search results.

这里是 通过 Twitter 的搜索 API 进行相同的搜索(注意:需要身份验证) - 您也可以在 API 控制台.

Here's the same search via Twitter's search API (note: requires authentication) - you can also test it in the API console.

这篇关于在即将到来的更新后,如何通过 PHP 获取 Twitter 共享计数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 07:56