The problem is with $.getJSON . As stated in the documentation , the request cannot successfully retrieve data from another domain, subdomain, or protocol.
I donβt see that you mentioned the language you want to use to receive these messages, but here are two simple examples of how to do this 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
misterjinx
source share