搜索带有 t.co 重写链接的推文 [英] Search for tweets with t.co rewritten links

查看:16
本文介绍了搜索带有 t.co 重写链接的推文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚刚注意到在 t.co/LINKHERE 一个由 twitter 重写的链接之后访问者激增.如果您知道链接,有没有办法追溯到包含该链接的 Twitter 消息?

解决方案

您可以使用 twitter API 1.1 执行此操作.使用 api 的最简单方法是通过 twitter API 控制台.以下是步骤:

  1. 转到 https://dev.twitter.com/rest/tools/console

  2. Service 下拉菜单中选择 https://api.twitter.com/1.1.

  3. Authentication 下拉菜单中选择 OAuth 1 并使用您的 Twitter 帐户进行授权.

  4. 选择GET /search/tweets.json api.

  5. q 查询参数中输入 t.co 链接(例如 https://t.co/w6iqrcuZMA)(尝试同时尝试 http 和https 链接.在我的例子中,http 链接没有返回记录,而 https 链接返回了一些记录).所有搜索结果将以json格式返回.

  6. 现在要打开实际的推文,请使用此链接(当然要填充占位符):https://twitter.com/{user.screen_name}/status/{id_str}

Just noticed a spike of visitors following a t.co/LINKHERE a link re-written by twitter. Is there a way to track back to the twitter message that contained the link, if you know the link?

解决方案

You can do this using twitter API 1.1. The easiest way is to use the api is through the twitter API console. Here are the steps:

  1. Goto https://dev.twitter.com/rest/tools/console

  2. Select https://api.twitter.com/1.1 from the Service dropdown menu.

  3. Select OAuth 1 from the Authentication dropdown menu and authorize with your twitter account.

  4. Choose GET /search/tweets.json api.

  5. Type the t.co link (e.g. https://t.co/w6iqrcuZMA) in q query parameter (Try both http and https links. In my case the http link returned no record while https link returned some records). All the search results will be returned in json format.

  6. Now to open the actual tweet use this link (fill the placeholders of course): https://twitter.com/{user.screen_name}/status/{id_str}

这篇关于搜索带有 t.co 重写链接的推文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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