Hi, i am trying to authenticate something(in this case LinkedIn) using OAuth but the requested token always returns null?
Here is my code below:
public void authenticateAppOauthApi() {
Log.d(TAG, "authenticateAppOauthApi");
OAuthServiceProvider provider = new OAuthServiceProvider(
REQUEST_TOKEN_PATH, AUTHORIZE_PATH, ACCESS_TOKEN_PATH);
OAuthConsumer consumer = new OAuthConsumer(CALLBACK_URL, API_KEY,
SECRET_KEY, provider);
OAuthAccessor accessor = new OAuthAccessor(consumer);
Intent intent = new Intent(Intent.ACTION_VIEW);
Log.d(TAG, "Intent intent = new Intent(Intent.ACTION_VIEW );");
// intent.setData(Uri.parse(url));
String url = accessor.consumer.serviceProvider.userAuthorizationURL
+ "?oauth_token=" + accessor.requestToken + "&oauth_callback="
+ accessor.consumer.callbackURL;
intent.setData(Uri.parse(url));
Log.d(TAG, "intent.setData(Uri.parse(url)); = " + url);
mContext.startActivity(intent);
Log.d(TAG, "finish authenticateApp");
}
I basicaly followed the example here http://donpark.org/blog/2009/01/24/android-client-side-oauth
thanks in advance