skip to Main Content

How can I post via API to a Facebook Page without having my "Facebook App" suspended/deleted?

I need to share a URLs per day, via API, from my own script to a Facebook Page I manage.

I followed these instructions to create a "Facebook app" and get the "never-expiring" token.

Once I have the token, I can easily post like this:

<?php
class FacebookMessenger
{
    protected string $pageId = '<my-page-id>';
    protected string $token  = '<my-token>';

    public function sendUrlToPage(string $url)
    {
        $endpoint = "https://graph.facebook.com/v19.0/{$this->pageId}/feed";

        $this->lastResponse =
            HttpClient::create()->request('POST', $endpoint, [
                "headers" => [
                    "Content-Type" => "application/json",
                ],
                "query" => [
                    "link"          => $url,
                    "access_token"  => $this->token
                ]
            ]);

        $content = $this->lastResponse->getContent(false);
        var_dump($content);
        die();
    }
}


(new FacebookMessenger())->sendUrlToPage('https://example.com');

This works beautiful for a few days, but then the Facebook App I created gets "restricted":

TLI Sharer App DEV is restricted due to violations

The app TLI Sharer App DEV is in violation of Meta’s Platform Terms or Developer Policies and has been restricted, as described below:
Platform Term 7.e.i.2 – Negatively impacting platform, products, data, or users

We determined that your app is negatively impacting the platform, products, data, or users and has violated or may have violated our terms. This violates Platform Term 7.e.i.2.

This is the linked page: https://developers.facebook.com/terms/dfc_platform_terms/#compliancereviewrightsandsuspensionandterminationoftheseterms

I fail to see how running 5/6 API requests like this is a problem, and I have absolutely ZERO ideas on how to proceed.

2

Answers


  1. The API provided by Facebook has limitations. For example, the number of posts sent per hour is different between free accounts and paid accounts. Even with a paid account, there is still a limit to the number of posts you can send each month.

    Login or Signup to reply.
  2. To publish via API to a Facebook Page without risking your app getting suspended or deleted, you strictly have to comply with the Facebook Platform Policies. This means that your app must necessarily pass through the App Review process and request only the necessary permissions, such as pages_manage_posts and pages_read_engagement. Implement long-lived page access tokens to avoid token expiration issues. Manage posts responsibly.

    Post only occasionally and not spammy ways. Call to the /page-id/feed endpoint via a proper message and an access token. Be transparent with your users; hence you must definitely have users explicitly allow postings on their behalf.

    Keep on tracking your app for regular activity and removing engagement bait, account use, or API rate limit violations. Clearly define what your application will do during the review, and be responsive to Facebook because problems flagged keep your app in good standing.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search