Need a knowledge base like this for your business?


How to add a Facebook Like Button to your App

By Kim Dixon, MyPhotoApp Training Guru

Created: March 28, 2017, 9:18 pm UTC
Last updated: March 29, 2017, 12:18 am UTC

How to put a Facebook LIKE button in your app:

  1. Add an HTML section and enter the code below. 
  2. Change the  YOURFBPAGE element of the link to your Facebook ID 
  3. Choose how you want your button to look - there are 4 different options for the data-layout setting  in the example code below the data-layout is set as "button":

    "button"             

    "standard"            

    "box_count"         

    "button_count"      

 

The Facebook Like button will display centered in the app except for the standard option which displays offset fro the center on the left. 


4. You can change the data-size from "small" to "large" 

 

This is the code to copy ad paste into the HTML section in your App:

<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_US/sdk.js#xfbml=1&version=v2.8";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>

<center>
<div class="fb-like" data-href="http://www.facebook.com/YOURFBPAGE" data-layout="button" data-action="like" data-size="small" data-show-faces="false" data-share="false" ></div></center>

 

Many thanks to the Awesome  Angela Navarette for doing all the hard work working out the code