Facebook Login Issues

Hello,

I am creating an app that integrates a Facebook login. I
am have issues with both Async with SDK and Async without SDK method
calls for different reasons. When I use the Async without SDK
call(loginWithFacebook) and map the users properities such as first
name, last name, and email to the Users table, I get a strange message.
The message states that “Your popup is too small to display this page.
Please enlarge it to proceed.” I am assuming this has something to do
with the webview that is inserted as an argument to the
loginWithFacebook method call. However, your documentation states that
insert this argument is optional. So inserting null should not be a
problem and it should default to backendless default view? Any suggestions?

The
issue with the loginWithFacebookSDK is a little bit different.
Everything is setup for the Facebook SDK. When the method is called, it
redirects to the Facebook login page. Once the email and password is
entered in, everything is confirmed on Facebook’s end and redirects by
to the login page. Once the login page appears, the app crashes. The
error states the the activity I am trying to login from is not
Serializable. (java.io.NotSerializableException: com.growlin.application.growlinapp.LoginActivity (name of the app)).
Any suggestions?

Thanks

Hi Parwinder,

I created an internal ticket so our engineers will look into the problem.

Also, I am not sure why that would be needed (I hope to get an answer myself), but have you tries making the com.growlin.application.growlinapp.LoginActivity class Serializable?

Regards,
Mark

Hi, Parwinder,

Could you please provide the code samples where you are calling facebook-login methods with mappings, like the one in documentation?

Hello Sergey,

Here is the sample

Backendless.txt (1.4kB)

Firsly, check that you are using the latest Backendless AndroidSDK: you can download it at https://backendless.com/backend-as-a-service/downloads/
Besides that, you are using invalid permissions - first_name and last_name. According to Facebook documentation, these two are included in “public_profile” permission (means you cannot request permission for only several from this package). So you may use permissions.add( “public_profile” ), but really you don’t need as long as Facebook includes this permission by default.
I tried to execute your exact code only excluding lines

add("first_name");
add("last_name");

and it worked fine. Could you please try again without these two lines and having downloaded the latest version of Backendless AndroidSDK?