Created
June 3, 2016 15:56
-
-
Save hassantafreshi/48f7bf5c84f88ed837ae74dfa4a0888c to your computer and use it in GitHub Desktop.
Show likes of a fan page Facebook in your page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<?php | |
//persian comment | |
// value page_id zir ra be value page id khod jabeja konid | |
// bari bedast avardan value page be in site http://findmyfacebookid.com/ moraje konid | |
//English comment | |
//change value of page_id to your page id of fanpage | |
//you can find your page value id with this site : http://findmyfacebookid.com/ | |
$pageId = "124878794919"; | |
$xml = @simplexml_load_file("http://api.facebook.com/restserver.php?method=facebook.fql.query&query=SELECT%20fan_count%20FROM%20page%20WHERE%20page_id=".$pageId."") or die ("a lot"); | |
$count = $xml->page->fan_count; | |
?> | |
<a class="FB" href="https://www.facebook.com/pages/Web-Bro/124878794919?ref=hl" style="text-decoration:none; "> <?php echo $count; ?> </a> | |
// webbro.ir | |
<body> | |
<html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment