본문 바로가기

Software/Architecture

Social Links

Social Share Buttons

1.Face Book Share:

*Create Facebook account with developer

*Create an Application with proper configuration(see attached image for social-facebook.png)

-App ID/App Secrete should be match with link button app_id parameter(see following example source code)

*added a onclick event to know how many users clcked this icon on GAC(Google Analytic Code)

Example

<a class="facebook-share-button" href="https://www.facebook.com/dialog/feed?

  app_id=nnnnnnnnnnnn&amp;

  link=http://www.facebook.com/feedthecattitude?sk=app_nnnnnnnnnnn&amp;

  picture=http://feedthecattitude.ca/facebook_apps/contest2/contest_banner.jpg&amp;

  name=Win%20Purina%20Cat%20Chow%20for%20a%20Year!&amp;

  caption=Feed%20the%20Cattitude&amp;

  description=Enter%20daily%20to%20WIN%20Free%20Purina%20Cat%20Chow%20for%201%20Year!&amp;

  redirect_uri=http://www.facebook.com/" onclick="_gat._getTrackerByName()._trackEvent('Cattitude Contest - Facebook Share', 'Cattitude Contest - Facebook Share', 'Contest Referral - Share Button'); return !window.open(this.href, 'Share', 'width=1025,height=500');"><img src="img/fb-share.png"></a>