Unable to auto post on a Facebook Page using its PHP SDK

facebook php sdk
how to post into a facebook page with php using graph api
facebook api upload photo to page
facebook api share post
facebook api post to page
facebook debug api
facebook graph api example
laravel facebook sdk

I have read at many places that Facebook made some changes around 2018 that prevent people from posting as a page with PHP. I researched for a while to see if I can still auto post on a Facebook page if I am its Admin.

My sources: Facebook Graph API v3.1 Access Token Permission Limitations For Developers and https://adamboother.com/blog/automatically-posting-to-a-facebook-page-using-the-facebook-sdk-v5-for-php-facebook-api/

I am the only one who will use this auto-post app and I am the admin of the page on which I will be posting these links.

Here is the code I tried:

$fb = new Facebook\Facebook([
    'app_id' => 'app_id',
    'app_secret' => 'app_secret',
    'default_graph_version' => 'v2.2',
]);

$pageAccessToken = "page_access_token";


$linkData = [
    'link' => 'some_link',
    'message' => 'some_message'
];
try {
    $response = $fb->post('/me/feed', $linkData, $pageAccessToken);
} catch(Facebook\Exceptions\FacebookResponseException $e) {
    echo 'Graph returned an error: '.$e->getMessage();
    exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
    echo 'Facebook SDK returned an error: '.$e->getMessage();
    exit;
}
$graphNode = $response->getGraphNode();

Running the above code, I get the following error:

Graph returned an error: (#200) If posting to a group, requires app being installed in the group, and \ either publish_to_groups permission with user token, or both manage_pages \ and publish_pages permission with page token; If posting to a page, \ requires both manage_pages and publish_pages as an admin with \ sufficient administrative permission.

Now, I am an admin of the page. I also have selected manage_pages and publish_pages in permissions. So, why am I getting this error?

Automatically post to a Facebook page using the Facebook PHP API , Enter your App name and click 'create'. Under 'settings', you'll need to add a ' website platform' and enter the domain where this script will sit. For security, it's� Next up, you need to include the Facebook SDK for PHP. Facebook recommend you include the PHP SDK in your project using Composer, but you can also manually do so. In this example we’ll manually include the SDK, so you firstly need to download the SDK. Unzip the files and put the ‘src’ folder in your ‘facebook’ folder. Then include the

According to the documentation here, you can not publish posts by using the feed edge anymore. This documentation discusses editing and deleting the posts, it also says we can not create new posts.

Unable to auto post on a Facebook Page using its PHP SDK, t Facebook made some changes around 2018 that prevent people from posting as a page with PHP. I researched for a while to see if I can still� In a previous post I wrote about post automation on Twitter using PHP.The whole procedure is similar. You have to create a Facebook app and you need a PHP SDK to communicate with Facebook API.

You are most likely not using a Page Token, but a User Token. It still works, but you must use a Page Token to post to a Page.

Publish Content - Pages, A Page access token requested by a person who is able to perform the Send a POST request to the /{page-id}/feed endpoint and include the link parameter: If the video has expired, you must be the page admin to view its information. Any string otherwise parsable by PHP's strtotime() (e.g. +2 weeks , tomorrow )*. I am trying to auto post on Facebook page using my app it works fine if I replace my-page-numeric-id with my profile numeric id, but when I put my page numeric id instead of my-page-numeric-id and put valid access token it won't publish on Facebook page I tried to submit review permission that are as follow "manage_pages, publish_actions" but

Page Feed Graph API Reference, The feed of a Facebook Page including posts and links published by this Page, this endpoint in the last 90 days will be unable to use it starting on April 30th, 2019. PHP SDK. curl -i -X GET \ "https://graph.facebook.com/{your-page-id}/ feed the post is used in an ad, Facebook will automatically select the order of links in� We can also post photos, videos, text data to Facebook by using their API. We can create our own application interface and use the Facebook API and post. Facebook gives different channels to post photos or videos depending on the platform. Here, I have used the Facebook PHP SDK to upload photos to the Facebook edge.

Graph API Post, A page access token can read all posts posted to or posted by that Page. the post's owner's privacy settings may not allow your application to access it. PHP SDK JavaScript SDK Android SDK iOS SDK Graph API Explorer Whether automatically select the order of the links in multi-link share post when used in an ad. In this post, we will learn about Automatically post to a Facebook page using the Facebook PHP API (v5) with an example. Step 1: Create a Facebook ‘App’ on Facebook Developers: First Of all step We need to create a Latest a Facebook App, which is required in order to use the API.

Auto post script to facebook - PHP, Twitter: send message from a PHP page using Twitter API I'm still struggling to find a facebook way of doing it though. Automatically post to Facebook from PHP script | Tips4PHP I was able to do the auto-post we're discussing in this tread by assigning my own, personal profile as an admin for the page in question. To create a Facebook App please follow the steps of my previous post How to Auto Post on Facebook Using PHP and get the App ID and App secret key. Get Facebook Access Token: Now to get Facebook Access Token you need to use a PHP SDK (v5.0) to communicate with Facebook API.

Comments
  • I select Page Token from the dropdown but after selecting the required permissions it goes back to User Token.
  • you have to select the permissions FIRST, and authorize them. after that, you can select the page token from the dropdown.