Twitter’s Tweet Button and rel=”me”

If you’re looking for an alternate means of telling Twitter’s Tweet Button whom to attribute a tweet to, you can use rel="me" as the documentation suggests.

All you have to do is add your Twitter profile to you page’s <head> section as a linked relationship:

<link rel="me" href="http://twitter.com/tcorp" />

The Tweet Button can now automatically detect the Twitter profile of the author and thus attribute the tweet to that account.

The following Tweet Button doesn’t have a data-via value and uses the rel=”me” code from the head of the page to attribute the tweet to “@TCorp”:

<a href="http://twitter.com/share"
data-url="http://0xtc.com/2010/09/17/twitters-tweet-button-and-rel-me.xhtml"
data-text="Twitter's Tweet Button and rel=&quot;me&quot;"
data-lang="en"
data-count="vertical"
data-counturl="http://0xtc.com/2010/09/17/twitters-tweet-button-and-rel-me.xhtml"
rel="nofollow"
class="twitter-share-button">Tweet</a>

Resulting in:

Related Posts

Posted by Tanin on September 17, 2010 in Coding

Tags: