0

$graph_url = "https://graph.facebook.com/".$_SESSION['sm_info']['fbid']."/feed?fields=id,name,created_time,description,message,full_picture,type,status_type,link,comments,likes&limit=10000&since=".$datefrm2."&until=".$dateto1."&access_token=".$_SESSION['access_token'];

$feed['feeds'][] = json_decode(file_get_contents($graph_url));

This is the code we have written to get browser data into variable and then store data in array, for test user. We got data when we execute it in fb tool explorer. But when executing, in our app, it is showing blank page, and not showing any browser data. Please help me in this.

Cherrie
  • 1
  • 5
  • Stop doing nested calls such as `json_decode(file_get_contents(…))` - this makes is harder to tell, which of the two functions calls did not actually work as intended. Do these things separately, one after the other - and then properly check what the result of each step was. – 04FS Nov 13 '19 at 13:30
  • Ok, i will check and get back to you. Thanks for ur reply. – Cherrie Nov 13 '19 at 13:54
  • Called separately, but still not getting data. – Cherrie Nov 14 '19 at 03:21
  • Then instruct file_get_contents to return the response body even in case of an error, https://stackoverflow.com/questions/6040978/need-response-body-of-http-500-with-file-get-contents-php – 04FS Nov 14 '19 at 07:18

0 Answers0