Skip to content

Instantly share code, notes, and snippets.

@Mauryashubham
Created March 15, 2017 14:09
Show Gist options
  • Save Mauryashubham/b61dafab0450cb8a23f3fec7a1662db3 to your computer and use it in GitHub Desktop.
Save Mauryashubham/b61dafab0450cb8a23f3fec7a1662db3 to your computer and use it in GitHub Desktop.
SHARE POST ON FACEBOOK PLUGIN EASY WAY
Hi all , Welcome to Maurya Tricks , Today we are going to discuss ,
how to Share Post on Facebook in an easy way.
1.Make a file in notepad and save it as index.php and paste the below code.
<html>
<body>
<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/sdk.js#xfbml=1&version=v2.8";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<h3>FACEBOOK SHARE POST</h3>
<!-- data-href refers to Your Post link-->
<div class="fb-share-button" data-href="http://maurya.gnsoftech.in/wp/2017/03/11/send-email-using-php-mailer-in-php/" data-layout="button_count" data-size="small" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2F&amp;src=sdkpreparse">Share</a></div>
<br>
</body>
</html>
STAY CONNECTED FOR MORE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment