OAuth
Android アプリでLinkedIn を使用しています。LinkedIn アプリケーション、コンシューマ キー、およびシークレットは既にあるので、正常にリクエストできます。
コールバックまではすべて問題ありません。Web ページがコールバックしていない、onNewIntent
つまり、onResume
メソッドがコールされていないということです。Web ページには、パラメーター付きのコールバック URL のみが表示されます。つまり、次のようになります。
callback_url://?oauth_token=324sdf&oath_verifier=as21dsf
ここに私のすべてのコードがあります:
try {
consumer = new CommonsHttpOAuthConsumer("ConsumerKey", "ConsumerSecret");
provider = new CommonsHttpOAuthProvider("https://api.linkedin.com/uas/oauth/requestToken", "https://api.linkedin.com/uas/oauth/accessToken", "https://api.linkedin.com/uas/oauth/authorize");
final String url = provider.retrieveRequestToken(consumer, Constants.OAUTH_CALLBACK_URL);
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)).setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_FROM_BACKGROUND);
startActivity(intent);
} catch (Exception e) {
e.printStackTrace();
}
アクティビティは のように既に定義されsingleInstance
ていManifest
ます。
何が間違っているか、または不足していますか?