Ravi Bhandari
Ravi Bhandari

Reputation: 4698

facebook account kit - Returns error "We're sorry, something went wrong." in android

I am implementing facebook account kit in android app. I've completed initial setup and when I run the app it displays error

We're sorry, something went wrong.

https://developers.facebook.com/docs/accountkit/android

I searched a lot but did not find anything helpful. If anyone has something to share please share here.

Upvotes: 6

Views: 4428

Answers (3)

King Reload
King Reload

Reputation: 2952

@JayVDiyk You can get more information for an error by setting the debug flag of the init method to true, for more information about the reference:

https://developers.facebook.com/docs/accountkit/webjs/reference

The way you could set init method to true:

AccountKit.init({appId: 1, state: state, version: 'v1.0', debug: true})

Else you could try the solution by adding the http://localhost:3000' like this: enter image description here

Upvotes: 2

rafsanahmad007
rafsanahmad007

Reputation: 23881

Make sure you set up the Account kit properly. The error shows with incorrect setup in my case.

steps are:

  1. Generate Key Hash
  2. Create a Facebook App.
  3. Add Account Kit to your Facebook App enter image description hereenter image description hereenter image description here

  4. Android Integration

    a. Gradle Dependencies

Add dependency in gradle for Account Kit

repositories {
  jcenter()
}

dependencies {
  compile 'com.facebook.android:account-kit-sdk:4.+'
}

b. Android Manifest

Add the following to the AndroidManifest.xml

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

<activity
 android:name="com.facebook.accountkit.ui.AccountKitActivity"
 android:theme="@style/AppLoginTheme"
 tools:replace="android:theme"/>

Please Go through this links:

1) Link 1

2) Link 2

Upvotes: 1

Sugam Malviya
Sugam Malviya

Reputation: 59

You need to go through link https://developers.facebook.com/apps/ ----Your-App-ID--- /account-kit/

you can see Enable client access token flow. make it yes.

Upvotes: 5

Related Questions