0

I know this question already has an answer here although my error is slightly different as it ends with [extra]: null and I have a 'meta' question about the issue.

I am trying to implement Facebook Login.

I have tried all the solutions to the linked question but still get the error. The docs explain generating a development and release hash. My first question is, does this process even work in development or should I first sign my app before 'testing' this?

Also, I am thinking my AndroidManifest.xml is looking a bit funky - maybe I've messed something up here:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.asus.myapplication">

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCOUNT_MANAGER" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<application
    android:allowBackup="false"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity
        android:name=".MainActivity"
        android:screenOrientation="portrait"
        android:label="@string/app_name"
        android:theme="@style/AppTheme">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
    <provider android:authorities="com.facebook.app.FacebookContentProvider123456789"
        android:name="com.facebook.FacebookContentProvider"
        android:exported="true"/>

    <meta-data android:name="com.facebook.sdk.ApplicationId"
        android:value="@string/facebook_app_id"/>

    <activity android:name="com.facebook.FacebookActivity"
        android:configChanges=
            "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
        android:label="@string/app_name" />
    <activity
        android:name="com.facebook.CustomTabActivity"
        android:exported="true">
        <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:scheme="@string/fb_login_protocol_scheme" />
        </intent-filter>
    </activity>

</application>

I tried to add my wife as a tester and login as her. Same result.

I switched my app to Live. Nothing changed.

Any ideas where I am going wrong?

Dave Chambers
  • 2,483
  • 2
  • 32
  • 55
  • Did you find a fix? I have the exact same problem. – Dana Oct 10 '18 at 14:02
  • 1
    @Dana Use Google instead. Works perfectly and flawlessly. https://developers.google.com/identity/sign-in/android/start-integrating – Dave Chambers Oct 10 '18 at 14:17
  • It's a client request so had to do it. However the stupidest solution worked for me - adding all three permissions ["email", "public_profile", "user_friends"]. – Dana Oct 10 '18 at 14:23
  • @Dana Good to know. I am using Google now but let's hope your comment helps somebody else. – Dave Chambers Oct 10 '18 at 14:42

0 Answers0