Last active
August 29, 2015 14:10
-
-
Save Uriel29/42d34116217238e92dce to your computer and use it in GitHub Desktop.
Get likes facebook page PHP
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
<?php | |
$url = 'http://graph.facebook.com/oceanoliterario'; //Page link | |
echo '['.$url.']: '.json_decode(file_get_contents($url))->{'likes'}; | |
?> | |
//add variable | |
<?php | |
$url2 = 'http://graph.facebook.com/oceanoliterario'; | |
$likes = json_decode(file_get_contents($url2))->{'likes'}; | |
echo $likes; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment