Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

285
Views
Error: "You must provide an app access token, or a user access token that is an owner or developer of the app" using Facebook Login SDK

I have the problem that users can use our system to request reports of their ads on facebook.

These are the functions I use in the frontend (React):

export function initFacebookSdk() {
  return new Promise(resolve => {
    // wait for facebook sdk to initialize before starting the react app
    window.fbAsyncInit = function () {
      window.FB.init({
        appId: 'app-id',
        cookie: true,
        xfbml: true,
        version: 'v14.0'
      });
      resolve()
    };   
  });
}

export const FbLogin = () => {
  loadFacebookSDK(document, "script", "facebook-jssdk")
  initFacebookSdk()
  return new Promise( resolve => {
    window.FB.login(response => {
      if (response.authResponse) {
        resolve(response);
      } else {
        resolve(response);
      }
    }, {scope: 'ads_management,ads_read'});
  })
}

And so I call the function

const response = await FbLogin();

I send the token to the backend and this is how it uses the route:

try {
  const { data: accountsInfo } = await axios({
    url: `https://graph.facebook.com/v${FB_GRAPH_API_VERSION}/me/adaccounts?access_token=${accessToken}&pretty=1&limit=100`,
    method: 'GET',
  });
  

  res.status(200).json({success: true, accountsInfo})
  
} catch (err) {
  console.log(err);

  res.status(500).json({success: false})
}

And this is the error that I get when trying to use the user token:

'OAuth "Facebook Platform" "invalid_request" "(#100) You must provide an app access token, or a user access token that is an owner or developer of the app"'

Does anyone know why this is happening to me? help :(

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!