# Android Facebook login CANNOT GET /android/package/callback error

**URL:** <https://community.auth0.com/t/android-facebook-login-cannot-get-android-package-callback-error/6371>\
**Category:** Get Help\
**Tags:** android, error, facebook, login\
**Created:** [April 26, 2017, 4:40pm UTC](https://community.auth0.com/t/android-facebook-login-cannot-get-android-package-callback-error/6371 "2017-04-26T16:40:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![pandinus.imperator](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pandinus.imperator/32/3311_2.png) [@pandinus.imperator](https://community.auth0.com/u/pandinus.imperator)\
**Post date:** [April 26, 2017, 4:40pm UTC](https://community.auth0.com/t/android-facebook-login-cannot-get-android-package-callback-error/6371/1 "2017-04-26T16:40:27Z")

</div>

I’m trying to login using Facebook on my Android app, using:

```
            Auth0 auth0 = new Auth0(getString(R.string.auth0_client_id), getString(R.string.auth0_domain));
            WebAuthProvider.init(auth0)
                    .withConnection("facebook")
                    .start(LoginActivity.this, new AuthCallback() {
                        @Override
                        public void onFailure(@NonNull Dialog dialog) {
                            …
                        }
                        @Override
                        public void onFailure(AuthenticationException exception) {
                            …
                        }
                        @Override
                        public void onSuccess(@NonNull Credentials credentials) {
                            …
                        }
                    });

```

When running the app I’m prompted to login with Facebook, and after that, instead of returning to the app, I’m redirected to a page with the error: Cannot GET /android/[package-name]/callback?code=…]&state=…]

The [package-name] is the same that’s in the Android manifest.

---

<div class="post-metadata">

**Author:** ![Matthew\_Hartz](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/matthew_hartz/32/11896_2.png) [@Matthew\_Hartz](https://community.auth0.com/u/Matthew_Hartz)\
**Post date:** [May 4, 2017, 9:45am UTC](https://community.auth0.com/t/android-facebook-login-cannot-get-android-package-callback-error/6371/2 "2017-05-04T09:45:18Z")

</div>

Did you solve this?

---

<div class="post-metadata">

**Author:** ![Matthew\_Hartz](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/matthew_hartz/32/11896_2.png) [@Matthew\_Hartz](https://community.auth0.com/u/Matthew_Hartz)\
**Post date:** [May 4, 2017, 10:11am UTC](https://community.auth0.com/t/android-facebook-login-cannot-get-android-package-callback-error/6371/3 "2017-05-04T10:11:19Z")

</div>

Hi,

I’m experiencing this issue, but at some point I managed to get my test application working. Could it be that they are both using the same client?. Wondering if there are best places to debug other than just the callback URLs in auth0 and android manifest.

Callback: https://[domain]/android/[packagename]/callback

Manifest:`

```
    <activity
        android:name="com.auth0.android.lock.LockActivity"
        android:label="@string/app_name"
        android:launchMode="singleTask"
        android:screenOrientation="portrait"
        android:theme="@style/Lock.Theme">
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />

            <data
                android:host="@string/auth0_domain"
                android:pathPrefix="/android/[packagename]/callback"
                android:scheme="https" />
        </intent-filter>
    </activity>
    <activity
        android:name="com.auth0.android.provider.WebAuthActivity"
        android:theme="@style/Lock.Theme" />
    <!-- Auth0 Lock End -->`

```

---

<div class="post-metadata">

**Author:** ![Matthew\_Hartz](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/matthew_hartz/32/11896_2.png) [@Matthew\_Hartz](https://community.auth0.com/u/Matthew_Hartz)\
**Post date:** [May 4, 2017, 11:02am UTC](https://community.auth0.com/t/android-facebook-login-cannot-get-android-package-callback-error/6371/4 "2017-05-04T11:02:21Z")

</div>

Figured out my issue. At some point I said use my browser as the default app for my application in dev. This caused it to not handle the callback properly.

---

<div class="post-metadata">

**Author:** ![gigadrillgames](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@gigadrillgames](https://community.auth0.com/u/gigadrillgames)\
**Post date:** [May 16, 2017, 12:29am UTC](https://community.auth0.com/t/android-facebook-login-cannot-get-android-package-callback-error/6371/5 "2017-05-16T00:29:05Z")

</div>

hi i’m getting the same error after login on facebook using android, how to fix this? please help

---

<div class="post-metadata">

**Author:** ![gigadrillgames](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@gigadrillgames](https://community.auth0.com/u/gigadrillgames)\
**Post date:** [May 16, 2017, 12:31am UTC](https://community.auth0.com/t/android-facebook-login-cannot-get-android-package-callback-error/6371/6 "2017-05-16T00:31:08Z")

</div>

i’m just following this [https://auth0.com/docs/quickstart/native/android/00-centralized-login](https://auth0.com/docs/quickstart/native/android/00-centralized-login) but still get the same error

---

<div class="post-metadata">

**Author:** ![app](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@app](https://community.auth0.com/u/app)\
**Post date:** [August 28, 2017, 2:35am UTC](https://community.auth0.com/t/android-facebook-login-cannot-get-android-package-callback-error/6371/7 "2017-08-28T02:35:36Z")

</div>

I get same error. This is my code:

```
WebAuthProvider.init(auth0)
                                    .withScheme("https")
                                    .withAudience(String.format("https://%s/userinfo", getString(R.string.com_auth0_domain)))
                                    .withScope("openid offline_access")
                                    .start(BaseActivity.this, new AuthCallback() { .....

```

Did you solve it?

---

<div class="post-metadata">

**Author:** ![app](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@app](https://community.auth0.com/u/app)\
**Post date:** [August 28, 2017, 2:35am UTC](https://community.auth0.com/t/android-facebook-login-cannot-get-android-package-callback-error/6371/8 "2017-08-28T02:35:36Z")

</div>

I get same error. This is my code:

```
WebAuthProvider.init(auth0)
                                    .withScheme("https")
                                    .withAudience(String.format("https://%s/userinfo", getString(R.string.com_auth0_domain)))
                                    .withScope("openid offline_access")
                                    .start(BaseActivity.this, new AuthCallback() { .....

```

Did you solve it?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:53am UTC](https://community.auth0.com/t/android-facebook-login-cannot-get-android-package-callback-error/6371/9 "2018-03-02T05:53:30Z")

</div>


