The Client Token must be specified in the string resource file as com.facebook.accountkit.ClientToken

I have an android project and i want to use facebook account kit. I did all settings but when i run the project, i am getting this message;

E/AndroidRuntime: 500: Initialization error: 503: The Client Token must be specified in the string resource file as com.facebook.accountkit.ClientToken

But i specified it in strings.xml

<string name="ACCOUNT_KIT_CLIENT_TOKEN">***</string>

AndroidManifest.xml

<meta-data android:name="com.facebook.accountkit.ClientToken"
        android:value="@string/ACCOUNT_KIT_CLIENT_TOKEN" />

Waiting for your helps, thank you.

Upvotes: 3

Views: 5736

Answers (3)

Md Tariqul Islam
Md Tariqul Islam

Reputation: 2804

Check the attached to find to solution click on your products then go account-kit-->settings

enter image description here

Upvotes: 0

Shadab Shamsi
Shadab Shamsi

Reputation: 76

For me solution was adding following to the manifest file:

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

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

<meta-data
    android:name="com.facebook.accountkit.ClientToken"
    android:value="@string/ACCOUNT_KIT_CLIENT_TOKEN" />

And the creating the respective String resources as:

  1. facebook_app_id with app id, found at top-left corner next to navigation pane of facebook developer console for your app.

  2. app_name which is already defined generally in your string resource file with the name of your app.

  3. ACCOUNT_KIT_CLIENT_TOKEN with value found at Settings>advanced in navigation drawer of facebook developer console. Then go to Security, there you will find "Client Token". Use this client token value for value of this String resource.

This worked for me. Hope this helps.

Upvotes: 4

user7120361
user7120361

Reputation:

You should have something like this in string resources (you have to get the app_id)

<string name="facebook_app_id">2077942129****</string>

and in you Manifest:

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

Upvotes: 1

Related Questions