Hello,
I am implementing facebook login with cordova app. i am not able to understand which configuration needed to do in facebook app for this facebook login using meteor cordova. i have done following steps
-
create app
-
add website as platform
-
add Valid OAuth redirect URIs(https://www.facebook.com/connect/login_success.html,http://localhost:3000/oauthcallback.html,http://localhost:3000/_oauth/facebook?close)
-
add website url (“http://localhost:3000”)
-
added phonegap facebook connect plugin
6)below code in my mobile-config.js
App.configurePlugin(‘com.phonegap.plugins.facebookconnect’, {
APP_ID: ‘<APP_D>’,
APP_NAME: ‘<APP_NAME>’
});
-
i added following code in settings.json file
“facebook”: {
“appId”: “<APP_ID>”,
“secret”: “<APP_Secret>”
}
-
i added this code at server side js
ServiceConfiguration.configurations.insert({
service: ‘facebook’,
appId: ‘<APP_ID>’,
secret:"<APP_Secret>"
});
I am able to login in web but not able to login in cordova app. can anyone help me to config my facebook app
any one can help its really important for me!!!
You need to add a really obscure specific tarball.
meteor add particle4dev:cordova-fb
meteor add cordova:com.meteor.cordova-update@https://github.com/practicalmeteor/com.meteor.cordova-update/tarball/a7e98f27a26b727288da81dcfd8047eccb5f6036
Then in mobile-config.js you can use this:
if (this.process.env.NODE_ENV === 'production') {
App.configurePlugin('com.phonegap.plugins.facebookconnect', {
APP_ID: 'XXX', // production FB app ID
APP_NAME: 'Your App Name'
});
}
else {
App.configurePlugin('com.phonegap.plugins.facebookconnect', {
APP_ID: 'XXX', // test FB app ID
APP_NAME: 'Your App Name - Test'
});
}
1 Like
Now that I’ve done all of that, I have an app I need to put into production and I can’t figure out how to actually configure the facebook app to work in live mode.
I get an error that says:
Given URL is not allowed by the Application configuration. One or more of the given URLs is not allowed by the App’s settings. To use this URL, you must add a valid native platform in your App’s settings."
So if anyone could tell me what that means, I’d appreciate it!
I’ve tried adding meteor.local to the valid redirect setting in facebook but that didn’t work.