0

Hi I have Facebook login integration with Android and when I click the login button I get this warning :

"Sessionless Request needs token but missing either application ID or client token."

The application ID and keyHash are fine. I have login integration from official Facebook documentation.

Please help me.

Regards.

akshaivk
  • 427
  • 5
  • 24
roliva
  • 49
  • 6

2 Answers2

1

You need to specify your facebook app id in your code by going here https://developers.facebook.com/quickstarts/?platform=android get the facebook app id by following those tutorial. Then use it in your code like this

<string name="app_id">27368237928798</string>
    <meta-data
    android:name="com.facebook.sdk.ApplicationId"
    android:value="@string/app_id" />
Vivek Warde
  • 1,936
  • 8
  • 47
  • 77
  • I followed that tutorial, here are more details : 11588-11588/com.pegyx.app E/SensorManager﹕ thread start 09-28 00:42:25.156 11588-11588/com.pegyx.app D/SensorManager﹕ registerListener :: handle = 1598182229 name= BOSCH BMC150 Acceleration Sensor delay= 200000 09-28 00:42:25.179 11588-11620/com.pegyx.app D/Request﹕ Warning: Sessionless Request needs token but missing either application ID or client token. 09-28 00:42:29.093 11588-11588/com.pegyx.app D/SensorManager﹕ unregisterListener:: 09-28 00:42:29.093 11588-11588/com.pegyx.app D/Sensors﹕ Remain listener = Sending .. normal delay 200ms – roliva Sep 28 '14 at 03:48
  • my manifest : xxxxxxxxx I forced the webDialog login with "authButton.setLoginBehavior(SessionLoginBehavior.SUPPRESS_SSO);" and I solved the problem just for a few days. Now I give Facebook permission to my app and it closes. I get this logCat : DEV_ACTION_COMPLETED ¡help me please! – roliva Sep 28 '14 at 04:14
0

For me, the problem was solved by manually input the key hash at the app setting in http://developer.facebook.com/apps/{your_app_id_number}/settings/

It appears that the "quick starts" wizard does not really store the hash you write and no identification is possible. At least tested with the HelloFacebookSample included in SDK 3.21.1 https://github.com/facebook/facebook-android-sdk

Do not need to uninstall FB app as stated in Login failed invalid key error with Facebook SDK

Community
  • 1
  • 1
eccker
  • 41
  • 5