Search for tweets with t.co rewritten links

2020-05-25 12:09发布

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?

标签: twitter
4条回答
时光不老,我们不散
2楼-- · 2020-05-25 12:29

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}

查看更多
家丑人穷心不美
3楼-- · 2020-05-25 12:30

t.co links do show up in search, so if you're curious, you have about a week to find them before they get dropped from the search index.

For example: http://search.twitter.com/search.json?q=https:%2F%2Ft.co%2FGJMsIcM6

Returns:

{
  "completed_in": 0.019,
  "max_id": 178215431251828740,
  "max_id_str": "178215431251828736",
  "page": 1,
  "query": "https%3A%2F%2Ft.co%2FGJMsIcM6",
  "refresh_url": "?since_id=178215431251828736&q=https%3A%2F%2Ft.co%2FGJMsIcM6",
  "results": [
    {
      "created_at": "Fri, 09 Mar 2012 20:27:24 +0000",
      "from_user": "kurrik",
      "from_user_id": 7588892,
      "from_user_id_str": "7588892",
      "from_user_name": "Arne Roomann-Kurrik",
      "geo": null,
      "id": 178215431251828740,
      "id_str": "178215431251828736",
      "iso_language_code": "en",
      "metadata": {
        "result_type": "recent"
      },
      "profile_image_url": "http://a0.twimg.com/profile_images/24229162/arne001_normal.jpg",
      "profile_image_url_https": "https://si0.twimg.com/profile_images/24229162/arne001_normal.jpg",
      "source": "<a href="http://twitter.com/tweetbutton" rel="nofollow">Tweet Button</a>",
      "text": "RT @raffi: “Twitter Catches the 'SPDY' Train” from @wired → http://t.co/suCbWWEl (& they reference my tweet! → https://t.co/GJMsIcM6)",
      "to_user": null,
      "to_user_id": null,
      "to_user_id_str": null,
      "to_user_name": null
    },
    {
      "created_at": "Fri, 09 Mar 2012 20:26:26 +0000",
      "from_user": "raffi",
      "from_user_id": 8285392,
      "from_user_id_str": "8285392",
      "from_user_name": "Raffi Krikorian",
      "geo": null,
      "id": 178215186921033730,
      "id_str": "178215186921033730",
      "iso_language_code": "en",
      "metadata": {
        "result_type": "recent"
      },
      "profile_image_url": "http://a0.twimg.com/profile_images/1270234259/raffi-headshot-casual_normal.png",
      "profile_image_url_https": "https://si0.twimg.com/profile_images/1270234259/raffi-headshot-casual_normal.png",
      "source": "<a href="http://twitter.com/tweetbutton" rel="nofollow">Tweet Button</a>",
      "text": "“Twitter Catches the 'SPDY' Train” from @wired → http://t.co/suCbWWEl (& they reference my tweet! → https://t.co/GJMsIcM6)",
      "to_user": null,
      "to_user_id": null,
      "to_user_id_str": null,
      "to_user_name": null
    }
  ],
  "results_per_page": 15,
  "since_id": 0,
  "since_id_str": "0"
}

You'll see that search returns retweets as well.

查看更多
做个烂人
4楼-- · 2020-05-25 12:37

Here’s the quick and easy way:

  1. Go to: http://dev.twitter.com/rest/tools/console
  2. Service: “api.twitter.com/1.1”

  3. Authentication: OAuth 1, then log in if you need to

  4. Make sure GET is selected and paste https://api.twitter.com/1.1/search/tweets.json?q=http%3A%2F%2Ft.co%2F{**SUFFIX**} into the Request URL box.

  5. Replace **SUFFIX** with the t.co URL suffix. So if the URL you’re searching for is t.co/**N2ul8FFCxu**, the link you pasted should look like this:

https://api.twitter.com/1.1/search/tweets.json?q=http%3A%2F%2Ft.co%2F{**N2ul8FFCxu**}

  1. Click Send

  2. Open a new tab and paste twitter.com/**SCREEN_NAME**/status/**ID_STR** into the address bar

  3. Replace **SCREEN_NAME** and **ID_STR** with info from Response. Like this:

twitter.com/**twitter**/status/**526534593826938881**

查看更多
Animai°情兽
5楼-- · 2020-05-25 12:44

The standard twitter search will work for a few days.

For older t.co links, you could try searching with find-tco.appspot.com.

查看更多
登录 后发表回答