When i use this code:
<?php
require_once "vendor/autoload.php";
$config = ...;
use FacebookAds\Api;
use FacebookAds\Object\Page;
Api::init(
$config['facebook']['app_id'], //APP_ID
$config['facebook']['app_secret'], //APP SECRET
$config['facebook']['app_access_token'] //Token generated by https://developers.facebook.com/tools/explorer for app
);
$page = new Page($config['facebook']['page_id']);
$leadgen_forms = $page->getLeadgenForms(); //heres an error
I get error:
Fatal error: Uncaught FacebookAds\Http\Exception\AuthorizationException: (#190) This method must be called with a Page Access Token in ...
But when I put page_access_token in place of app_access_token (from https://developers.facebook.com/tools/explorer) i get error: Uncaught FacebookAds\Http\Exception\AuthorizationException: Invalid appsecret_proof provided in the API argument in ...
. When i remove line: