parse-community / ParseFacebookUtils-Android

A utility library to authenticate ParseUsers with the Facebook SDK
http://docs.parseplatform.org/android/guide/#facebook-users
Other
53 stars 63 forks source link

logInWithReadPermissionsInBackground Time out error #31

Open grinneh opened 6 years ago

grinneh commented 6 years ago

Hi everyone,

I've been working on an app for some time using the combination of Parse and Facebook, which uses ParseFacebookUtils, and about a week or so ago I ran into a problem where the dialog box allowing me to log into Facebook either via app or browser stopped showing up. What I get is a long pause where it tries to load the dialog and then it times out.

The error produces the following message: Facebook Signup:: net::ERR_TIMED_OUT

Code is as follows

@Override
public void onClick(View v) {

    Log.d("Facebook Signup:", "Started");

    ParseFacebookUtils.logInWithReadPermissionsInBackground(MainActivity.this, Arrays.asList("public_profile", "email", "user_friends"), new LogInCallback() {

        @Override
        public void done(ParseUser user, ParseException err) {
            if (err == null && user != null) {

                Log.d("Facebook Signup:", "Returned Successfully");

                if (NetworkUtils.isInternetAvailable(MainActivity.this)) {

                    Log.d("Facebook Signup:", "Internet On");

                    getUserDetailsFromFB();
                } else {
                    DialogUtils.showErrorAlert(MainActivity.this, "No Network!", "You are not connected to internet. Please connect and try again.");
                }
            }
            else
            {
                Log.d("Facebook Signup:", err.getMessage());
            }
        }
    });
}

The process starts normally, but never reaches the "Returned Successfully" point of the code, it just goes to the exception which has the time out error. Please note that this was working about 2-3 weeks ago.

I'm using the following versions: com.facebook.android:facebook-android-sdk:4.27.0 com.parse:parsefacebookutils-v4-android:1.10.5

Thanks for your assistance!