2011-12-18T19:04:12+01:00

Social?


Twitter

How to get count per link?

        http://urls.api.twitter.com/1/urls/count.json?url=http://www.perl.org/
        {"count":351,"url":"http://www.perl.org/;}

Statistics tool?

Not yet but soon? https://dev.twitter.com/blog/introducing-twitter-web-analytics

How to hook to an event?

https://dev.twitter.com/docs/intents/events

http://stackoverflow.com/questions/4947825/is-there-a-callback-for-twitters-tweet-button

        twttr.events.bind('tweet',    tweetIntentToAnalytics);

How to create button?

http://twitter.com/goodies/tweetbutton https://dev.twitter.com/docs/tweet-button

    <script src="//platform.twitter.com/widgets.js" type="text/javascript"></script>
    <div>
      <a href="https://twitter.com/share" class="twitter-share-button"
         data-url="http://bit.ly/twitter-api-announce;
         data-counturl="http://groups.google.com/group/twitter-api-announce;
         data-count="vertical"
         data-lang="es">Tweet</a>
    </div>

Supports Open Graph?

No - https://dev.twitter.com/discussions/1244


Facebook

How to get count per link?

        http://graph.facebook.com/?id=http://www.perl.org/
        {
           "id": "http://www.perl.org/;,
           "shares": 370
        }

Statistics tool?

http://www.facebook.com/insights/

Needs meta tag on the root page.

        <meta property="fb:page_id" content="159636650742750" />

How to hook to an event?

http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/

How to create button?

http://developers.facebook.com/docs/reference/plugins/like/

        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));</script>
        <div class="fb-like" data-href="http://www.perl.org/; data-send="false"
        data-layout="button_count" data-width="450" data-show-faces="true"
        data-action="recommend"></div>

Supports Open Graph?

Yes - https://developers.facebook.com/docs/opengraph/

Debug tool - http://developers.facebook.com/tools/debug


Google+

How to get count per link?

        https://plusone.google.com/u/0/_/+1/fastbutton?count=true&url=http://www.perl.org/

Statistics tool?

https://www.google.com/webmasters/tools/

Navigate to "+1 Metrics"

How to hook to an event?

        <g:plusone size="tall" callback="plusone_vote"></g:plusone>

How to create button?

http://www.google.com/webmasters/+1/button/

        <!-- Place this tag where you want the +1 button to render -->
        <g:plusone></g:plusone>
        <!-- Place this render call where appropriate -->
        <script type="text/javascript">
          window.___gcfg = {lang: 'en-GB'};
          (function() {
                var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
                po.src = 'https://apis.google.com/js/plusone.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
          })();
        </script>

Supports Open Graph?

Yes - https://developers.google.com/+/plugins/+1button/