Reputation: 63
I'm trying to make a Facebook login to my application using Parse core. I have followed tutorials on the following pages: https://parse.com/docs/android/guide#users-facebook-users https://developers.facebook.com/docs/android/getting-started
My app is initialized with Parse, Facebook SDK and ParseFacebookUtils. Though everything is OK till the moment my application gets to the LogInCallback() method. It always logs me
"Uh oh. The user cancelled the Facebook login."
with a ParseException messages of
"The supplied Facebook session token is expired or invalid."
The solution of embedding the Facebook app's App Secret didn't work for me.
ParseFacebookUtils.logInWithReadPermissionsInBackground(this, permissions, new LogInCallback() {
@Override
public void done(ParseUser user, ParseException err) {
if (user == null) {
Log.d("MyApp", "Uh oh. The user cancelled the Facebook login.");
} else if (user.isNew()) {
Log.d("MyApp", "User signed up and logged in through Facebook!");
} else {
Log.d("MyApp", "User logged in through Facebook!");
}
}
});
Can anybody help me?
Upvotes: 0
Views: 445
Reputation: 99
I had a same problem. Turned out I didn't set the AppSecret in the Parse dashboard right. Try that out.
Upvotes: 3
Reputation: 3297
Please check you've set the the facebook application id. You can get the facebook application id from the application dashboard on developer.facebook.com.
Also check that application is activated in developer.facebook.com (you will see a green circle right the application name) and you entered the correct key for release and debug version to match with your application.
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id"/>
Upvotes: 0