Find answers, ask questions, and connect with our
community around the world.

Forums Forums Web Design How to get latest Facebook posts from page?

  • How to get latest Facebook posts from page?

    updated 3 years, 4 months ago 0 Member · 1 Post
  • Maverick

    September 17, 2019 at 4:02 am

    I am trying to fetch latest Facebook posts from my company page and show them on my company website. The following is the code which worked for a very short time, it uses Facebook PHP SDK, now it says that access token is expired. I have tried setting the Facebook app, so I have App ID and Secret. Then I have tried setting a Request review for “Page Public Content Access”. But apparently I also need to “Upload screencast showing the end-to-end user experience”. WTF? I don’t have that. Is this even the right approach because it seems too complicated for such a simple stuff? $fb = new FacebookFacebook([ ‘app_id’ => ‘111111111111111’, ‘app_secret’ => ‘2222222222222222’, ‘default_graph_version’ => ‘v2.10’, ‘default_access_token’ => ‘3333333333333333333’, ]); try { $response = $fb->get(‘/FACEBOOKPAGE/feed?limit=4&fields=attachments’, $access_token); $response = $response->getDecodedBody(); } catch(FacebookExceptionsFacebookResponseException $e) { echo ‘Graph returned an error: ‘ . $e->getMessage(); } catch(FacebookExceptionsFacebookSDKException $e) { echo ‘Facebook SDK returned an error: ‘ . $e->getMessage(); } – by hq overview shkico – –

Viewing 1 of 1 replies
Reply to: Maverick
Your information:

Original Post
0 of 0 posts June 2018