Skip to content Skip to sidebar Skip to footer

Facebook Prompting User Login Twice

I have an Android app with Facebook login integrated with parse.com. Unfortunately, when a user logs in with facebook the authorize web view gets launched twice. I have searched ex

Solution 1:

SOLVED

There is a difference between using a standard button in xml (as provided in parse documentation) and using the facebook widget button (as provided in the facebook documentation)

The facebook widget has some ingrained functionality that launches the login (not sure how).

The standard button requires you to attach a listener, call the parse facebook login function.

As I had the listenar and the parse call in addition to the widget, login was getting called twice.

changed this: < com.facebook.widget.LoginButton.../>

to this:

<Button
    android:id="@+id/fbLoginButton"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true"
    android:layout_marginBottom="10dp"
    android:gravity="center_horizontal"
    android:background="@drawable/button_login"
    android:text="@string/login"
    android:textColor="#fff" />

Post a Comment for "Facebook Prompting User Login Twice"