Note that there are some explanatory texts on larger screens.

plurals
  1. POAny way to capture the referring t.co link from Twitter?
    primarykey
    data
    text
    <p>I want to post multiple versions of the same link on Twitter but I want to capture them with unique identifiers when they hit my server. </p> <p>Twitter partially devised a mechanism for this, for example if I post <code>www.example.com</code> into a twitter message, Twitter will automatically resolve it into a custom URL beginning with <code>t.co</code>via a 301 re-direct.</p> <p>more information: <a href="http://groups.google.com/group/twitter-development-talk/browse_thread/thread/14d5474c13ed84aa?pli=1" rel="nofollow">Twitter Link Wrapping</a></p> <p>I want to capture this re-directed URL so I can have a unique identifier for similar links on Twitter.</p> <p>Is there a way to do it? Or is there a better way to handle this problem?</p> <p>(I'm looking for a solution in PHP/JS or if need be any possible way with any language)</p> <p><strong>EDIT:</strong> The link needs to be exactly the same in Twitter, can't have query parameters or hash on the link.</p> <p><strong>EDIT2:</strong> More investigation, the t.co link will remain the same if it's the same link url attributed to the same profile. For example, two links of <code>www.example.com</code> on the same twitter profile will yield the same t.co link, but the t.co link will be different if it's attributed to another profile. I guess this to mean even if there is a workaround for the above issue, there is still no way to differentiate exactly the same links on the same twitter profile server side. </p> <p><strong>EDIT3 12/26/11</strong> whats interesting too is that t.co differentiates between <code>http://</code> and <code>https</code> so you can in theory 'display' two of the same links on the same profile and they will look physically the same in Twitter but the t.co redirect link will be different. It will link to the http and https versions.</p> <ul> <li>Ultimately, what I'm trying to do is find out the tweet i.d of of a referring link that hits my server without resorting to URL params.</li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload