Unable to login with Facebook
I keep on getting the following response when trying to login with Facebook {code: 101, error: "Facebook auth is invalid for this user."}
Pointing to the parse.com hosted parse-server, everything works. Switching to my local parse-server does not work.
I am currently using Android for my app.
Same thing. Related to #49 and #81.
Did you set the FACEBOOK_APP_ID environment variable?
Hi, you need to set the FACEBOOK_APP_ID Like this : heroku config:set FACEBOOK_APP_ID=*********
then it is
export FACEBOOK_APP_ID=*****
@gfosco can I pass the FB app ID as a ParseServer parameter? I use more than one app in the server.
I made a change here in #86..
Merged, will tag a new release shortly
Getting a appIds.contains is not a function
Changing facebook.js contains to indexOf seems to work
if (data && appIds.indexOf(data.id) != -1) { return; }
Ok, made that change and tagged 2.0.3
Great @gfosco. Made my day
I have latest SDK and parse server locally installed. Facebook authentication was not configured during first parse server installation. Subsequently I am added Facebook authentication by adding following in new ParseServer block in app.js oauth: { facebook: { appIds: '35594027127xxxx' }}
I am using for IOS app.
I got error {code: 101, error: "Facebook auth is invalid for this user."}.
However when pointing to hosted parse server everything works fine.
facebook.js seems to be ok as per earlier post
To @sdalai, circa v2.1.6, check that the class level permissions on _User are all set to allowed (for me I had field creation turned off). Also for your appIds param, try removing the quotes so it is a real number.
@rsweny How do you change class level permissions?
In the Parse dashboard "Core" section click on the Security button in the top row. From that screen there is also an advanced toggle to see all the options.
Actually this may need to have been done before you migrated.. post-migration may have to either deploy your own local Parse Dashboard or you may have to edit the _SCHEMA table manually.
Hi there, it doesn't work with AWS. Can you help ?
Yeah, please advise on AWS how to get parse server working with facebook integration.
Works for me in AWS. I just had an issue with my App id configuration in AWS.
Btw, just saw this thread and running into the same issue on Heroku..
2016-08-22T21:37:45.224619+00:00 app[web.1]: "access_token": "EAANjrpgib6ABABUE...",
2016-08-22T21:37:45.271795+00:00 app[web.1]: error: Uncaught internal server error. Failed to validate this access token with Facebook. undefined
2016-08-22T21:37:45.270803+00:00 app[web.1]: error: Error generating response. 'Failed to validate this access token with Facebook.' error=Failed to validate this access token with Facebook.
2016-08-22T21:37:45.224619+00:00 app[web.1]: "expiration_date": "2016-10-21T17:20:42.036Z"
2016-08-22T21:37:45.298670+00:00 app[web.1]: Failed to validate this access token with Facebook.
We are using the latest iOS SDK and latest parse server 2.2.18
I have this in my index.js
databaseURI: databaseUri || 'xxx',
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: process.env.APP_ID || 'xxx',
facebookAppIds: ['123456789'],
masterKey: process.env.MASTER_KEY || '',
restAPIKeY: process.env.RESTAPI_KEY || '',
serverURL: process.env.SERVER_URL || 'https://xxx', // Don't forget to change to https if needed
fileKey: process.env.FILE_KEY || 'xxx',
filesAdapter: new S3Adapter(
process.env.AWS_ACCESS_KEY || 'xxx',
process.env.AWS_SECRET_ACCESS_KEY || 'xxx',
"bucket",
{directAccess: true}
),
push: {
ios: [
{
pfx: 'xxxx', // Prod PFX or P12
bundleId: 'xxx',
production: true // Prod
}
]
}
});
Any ideas?
Hi everyone, I have installed parse server on heroku but I can not login with facebook.
This is my configuration:
var api = new ParseServer({ databaseURI: databaseUri || 'mongodb://localhost:27017/dev', cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js', appId: process.env.APP_ID || 'myAppId', masterKey: process.env.MASTER_KEY || '', //Add your master key here. Keep it secret! serverURL: process.env.SERVER_URL || 'http://localhost:1337/parse', // Don't forget to change to https if needed facebookAppIds: [process.env.FACEBOOK_APP_ID], liveQuery: { classNames: ["Posts", "Comments"] // List of classes to support for query subscriptions } });
I set my FACEBOOK_APP_ID on heroku.
The message that I get on the android app is:
08-23 18:01:29.970 15226-15226/com.ginofarisano.jointandem W/ParseLoginFragment: Facebook login failed, exception: com.parse.ParseException: Errore di accesso: Si è verificato un errore durante l'accesso a questa applicazione. Riprova più tardi.
Help me, thanks and sorry for my english.