SocialAuthConfigurationException : Application keys are not correct SocialAuth for LinkedIn

271 views Asked by At
org.brickred.socialauth.exception.SocialAuthConfigurationException: Application keys are not correct. The server running the application should be same that was registered to get the keys.

while my application keys are 100% correct

api.linkedin.com.consumer_key = Client Id 

api.linkedin.com.consumer_secret = Client Secret

My Class Code

 @Override
public void onClick(View v) {
    switch (v.getId()) {
        case R.id.facebook_login:

            mAdapter.authorize(MainActivity.this, SocialAuthAdapter.Provider.FACEBOOK);
            break;

        case R.id.twitter_login:

            mAdapter.authorize(MainActivity.this, SocialAuthAdapter.Provider.TWITTER);
            break;

        case R.id.linkdin_login:

            mAdapter.authorize(MainActivity.this, SocialAuthAdapter.Provider.LINKEDIN);
            break;
    }
}

And My SocialAuth jars are :

socialauth-4.4.jar

socialauth-android-3.2.jar

I am using Android-23

1

There are 1 answers

0
karthik kolanji On

I too face the same problem . Please try the below code :

socialAuthAdapter=new SocialAuthAdapter(new ResponseListener());

                // Add providers
                socialAuthAdapter.addProvider(SocialAuthAdapter.Provider.LINKEDIN, R.drawable.linkedin);

                // Add keys and Secrets
                try{
                        socialAuthAdapter.addConfig(SocialAuthAdapter.Provider.LINKEDIN, LinkedInConst.CLIENT_ID,LinkedInConst.CLIENT_SECRET,null);
                }
                catch (Exception e){
                        Log.e(TAG, "initialize: "+e.toString() );
                }