How To integrate Face Book Log in button in your Site?

Step – 1 : First Identified at which place you want to place your like button on your site.

Step – 2 : Then Copy and paste bellow code as per the instructions.

<div id="fb-root">&nbsp;</div>
<script type="text/javascript">// <![CDATA[
(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 = "https://connect.facebook.net/en_US/all.js#xfbml=1&appId=ENTER YOUR APP ID";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
// ]]></script>



Step – 4 : If you do not have appid then please refer this post How To create a Facebook App Id And Secret id

Step – 5 : ENTER YOUR APP ID and adjust height, width and style as per your requirement.

Advertisements

Leave your comments

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s