Staff Blogs

Adding Twitter’s @anywhere to your site

April 15, 2010 by Mark Rochefort

  1. Create a new app at dev.twitter.com/anywhere/apps/new
    a) Application Name = Name of your website
    b) Application Website = Your website URL
    c) Callback URL = Your website URL
  2. Insert the following code into your html:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
     <script src="http://platform.twitter.com/anywhere.js?id=YOUR_APP_ID&v=1"></script>
      <script type="text/javascript">
          twttr.anywhere(onAnywhereLoad);
          function onAnywhereLoad(twitter) {
            twitter.hovercards();
            twitter('.follow-me').followButton("yourtwittername");

          };

      </script>
  3. Job done. Grab a coffee and read more on the API docs

Demo:
* hover card – @markrocky || @markrocky
* follow button –

No Tags

See original post