Steps I followed:
- Create app
- Add FB login for Business product in your app
- Create config with permission & asset I selected - Adaccount, Page, Pixel
Javascript SDK
window.FB.login(
(response) => {
if (response && response.authResponse && response.authResponse.accessToken) {
console.log("################")
console.log(response);
console.log("################")
}
},
{
config_id: 'your_id', // configuration ID goes here
response_type: 'code', // must be set to 'code' for SUAT
scope: 'business_management,ads_management,pages_read_engagement', // passing extra, tired without passing as well
return_scopes: true
}
);
On click of a button This will open a authentication pop-up. Post authentication: I get access_token(System user) as well as code.
Now as per documentation
Path 1: I'm suppose to use code through which I can get token, BUT getting error redirect_uri doesn't match.
&
Path 2: If I debug access_token from response

Scopes I set in configuration settings are not set/delegated to system user.
Following are my configurations:

Aim is to have access_token of system user so that I can run cron jobs to publish ads.