Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search for tweets with t.co rewritten links

Tags:

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?

like image 781
santa Avatar asked Sep 26 '11 20:09

santa


1 Answers

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}

like image 174
Uzair Farooq Avatar answered Sep 28 '22 05:09

Uzair Farooq