I'm having some trouble connecting to the Linkedin API.
I'm following this https://developer.linkedin.com/docs/android-sdk and this https://developer.linkedin.com/docs/android-sdk-auth, yet I'm getting this error code:
{
"errorCode": "INVALID_REQUEST",
"errorMessage": "either bundle id or package name \/ hash are invalid, unknown, malformed"
}
My implementation so far is pretty simple:
public void shareOnLinkedin() {
AuthListener authListener = new AuthListener() {
@Override
public void onAuthSuccess() {
Log.d(TAG, "Success");
}
@Override
public void onAuthError(LIAuthError error) {
Log.d(TAG, error.toString());
}
};
LISessionManager
.getInstance(getApplicationContext())
.init(ColectionDetailActivity.this, buildScope(), authListener, true);
}
private static Scope buildScope() {
return Scope.build(Scope.R_BASICPROFILE, Scope.W_SHARE);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
...
try {
LISessionManager.getInstance(getApplicationContext())
.onActivityResult(this, requestCode, resultCode, data);
} catch (Exception e) {
e.printStackTrace();
}
}