0

I have an issue of Facebook offline access-token please help me out how to solve this issue helps are definitely appreciated

That my code when i was tried

$access_token="AAACEdEose0cBAK2USdNINUVUuCNip2zlPyMoL19in3LzeZAP9ydifNV7oeBC2T4zdCZCUvhDW3FDxOcHzA6ofDHQX24Tbw1VwLGdzT0AZDZD";

$facebook_url="https://graph.facebook.com/".$dataPageId->PageID."/feed?access_token=".$access_token;
$facebookPageStatus=file_get_contents($facebook_url);
$fpsjson=json_decode($facebookPageStatus);

One more thing there is no Facebook session file in my code basically i want this functionality for cronjob... OR if i execute my code they generate an error like this

enter image description here

Query Master
  • 6,989
  • 5
  • 35
  • 58

1 Answers1

1

I've seen a lot of questions here about facebook api requests failing because of the use of file_get_contents. Check out these threads: Unable to file_get_contents to work, File_get_contents not working?, or just search for more threads: "[facebook] file_get_contents".

Other than that, I recommend you to stop using the offline_access since it is deprecated: Deprecation of Offline Access Permission

Community
  • 1
  • 1
Nitzan Tomer
  • 155,636
  • 47
  • 315
  • 299