Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning: Sessionless Request needs token but missing either application ID or client token

Using the FB SDK for Android sometimes it throws me error in Logcat.

Anyone knows the reason? My app is running and approved (Not on google play). I'm also using the hash thing and have my main activity and package name listed on the FB app page.

like image 816
Yehonatan Avatar asked May 18 '14 13:05

Yehonatan


People also ask

Why is the security token included in the request in invalid?

The error "the Security Token included in the Request in Invalid" can occur for multiple reasons: The user's credentials are inactive. Open the IAM console, click on the user, and in the Security Credentials tab, make sure the security credentials of the user are active. The user's access key ID and / or secret access key are incorrect.

How long is the session token valid for?

By default, the session token is temporary and valid for 12 hours If you prefer the Environment variable approach, set the following environment variables: I wrote a book in which I share everything I know about how to become a better, more efficient programmer. You can use the search field on my Home Page to filter through all of my articles.

Is response_type ‘ID_token’ enabled for the application?

AADSTS700054: response_type ‘id_token’ is not enabled for the application. Now, Once logged in to the Azure Portal, you can search for the Azure Active Directory and click on the search result Azure Active Directory response_type ‘id_token’ is not enabled for the application.

How to enable ID tokens in Azure AD app?

aadsts700054: response_type ‘id_token’ is not enabled for the application Now on the Azure AD App page, click on the Authentication link from the left navigation and then select the ID tokens option as highlighted below, then click on the Save button. aadsts700054


5 Answers

I think the facebook account that you use to share, hasn't a role in your facebook app. Go to your app developer facebook console and check Roles. Or set status and review to ON but I think it's not the good solution if your app isn't available on Google Play or App Store

like image 65
Allan Avatar answered Sep 29 '22 22:09

Allan


You should check your Hash Key in Settings at https://developers.facebook.com Try the code below to check and add correct hashkey. It work for me!!!

private void getSHAFingerPrint(){
      PackageInfo info;
      try {

          info = getPackageManager().getPackageInfo(
                  "your.package", PackageManager.GET_SIGNATURES);

          for (Signature signature : info.signatures) {
              MessageDigest md;
              md = MessageDigest.getInstance("SHA");
              md.update(signature.toByteArray());
              String something = new String(Base64.encode(md.digest(), 0));
              Log.e("Hash key", something);
              System.out.println("Hash key" + something);
          }

      } catch (NameNotFoundException e1) {
          Log.e("name not found", e1.toString());
      } catch (NoSuchAlgorithmException e) {
          Log.e("no such an algorithm", e.toString());
      } catch (Exception e) {
          Log.e("exception", e.toString());
      }
  }
like image 34
777Q Avatar answered Sep 29 '22 22:09

777Q


https://stackoverflow.com/a/4851484/3552317, is a solution that works for some peaple (and duplicate question) and this worked for me:

This worked for me:

       <string name="app_id">999999999999999</string>
        <meta-data
        android:name="com.facebook.sdk.ApplicationId"
        android:value="@string/app_id" />
like image 25
jobbert Avatar answered Sep 29 '22 23:09

jobbert


You got this error log because your session is expired, and you need call login again, it'll automatic login with user-authorized account and wouldn't promt user to accept the app's pubic permissions.

like image 34
Justin Avatar answered Sep 29 '22 21:09

Justin


You are getting this error because you have might not declare your application id in manifest.xml or you have not properly registered your application on "developers.facebook.com"

like image 27
Varun jain Avatar answered Sep 29 '22 22:09

Varun jain