Ionic 2 Facebook Login Redirect Error

Situation:

User should be redirected to Ionic app (iOS Emulator) after FB login (Safari) but im getting an error.

Debug:

Emulator -> Debug -> Logs -> Object id=’123456789' could not be found or something.

Solution:

Install a fresh ionic app and run command with the right ID & name on the FIRST time.

ionic add cordova-plugin-facebook4 --save --variable APP_ID="123456789" --variable APP_NAME="myApplication"
// APP_ID was the culprit, even if you run this command with the valid app id it will still fail...
Like what you read? Give Irvin Lin a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.