See Twitter Anywhere

To implement this on your own website, sign into Twitter and register your Twitter App at dev.twitter.com/apps.

Second, include this Javascript:

<script src="http://platform.twitter.com/anywhere.js?id=your-app-id&v=1" type="text/javascript"></script>

Follow Me!

We can easily follow a Twitter user just by mentioning them.

<script type="text/javascript">
  twttr.anywhere(function (T) {
    T('span.twitter-followme').followButton("swinny");
  });
</script>
<p><span class="twitter-followme">@Swinny - </span></p>

Who's that User?

We can easily create a hover for any Twitter user, such as @, @ or @.

<script type="text/javascript">
  twttr.anywhere(function (T) {
    T("span.twitter-hover").hovercards({
      username: function(node) {
        return node.innerHTML;
      }
    });

  });
</script>

Tweeting From Your Own Website

<div id="twitterbox"></div>
<script type="text/javascript">
  function twitterReceiver(tweet,htmltweet) {
   $('div#yourtweets').append('<p>Here is your Tweet:</p>'+htmltweet);
  }
  twttr.anywhere(function (T) {
    T("div#twitterbox").tweetBox({counter:true,height:'36px',width:'500px',label:'More useful is the ability to tweet directly:',defaultContent:'I think @swinny has helped me with the Twitter API! https://swinny.net/Twitter',listener:twitterReceiver});
  });
</script>
<div id="yourtweets"></div>


Comments

It's quiet in here...Add your comment