简体   繁体   中英

Getting Invalid App ID error while integrating with Facebook although my App ID is correct

Getting Invalid App ID error while integrating login with Facebook. I have exactly copied the code given on following Facebook page by replacing my App ID & Secret.

https://developers.facebook.com/docs/php/howto/example_facebook_login/5.0.0

I have tested the App ID by using http://graph.facebook.com/1486873724938940 and it's giving me app details correctly.

Following is the error I am getting on the screen after I click the login button.

Invalid App ID: {1486873724938940}

It was a very silly mistake but I am writing the answer for just in case some other newbie like me faces the same issue.

The code given by Facebook which I was using as reference went like: 'app_id' => '{app-id}'

Herein I was only replacing the app-id and not the curly brackets, therefore, was facing the issue.

What I was doing 'app_id' => '{1486873724938940}'

What I was supposed to be doing 'app_id' => '1486873724938940'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM