How to retrieve this information and show it in our website?
I\'ve tried this but no luck, please help.
The problem is related to $.getJSON
. As the documentation states, the request can not successfully retrieve data from a different domain, subdomain, or protocol.
I don't see you mention a language you want to use in order to get those posts, but here are 2 simple examples of how to do it using:
$info = json_decode(file_get_contents('https://graph.facebook.com/cocacola/posts'));
if ($info) { foreach ($info->data as $obj) { echo $obj->message, "<br/>"; } }
<script src="http://connect.facebook.net/en_US/all.js"></script> <script type="text/javascript"> FB.api('/cocacola/posts', function(response) { for (var i = 0; i < response.data.length; i++) { alert(response.data[i].message); } }); </script>
Good luck!