xamarin.authを使用してLinkedInにサインインしました。 Oauthが正常に完了した後、アプリケーション画面に直接行くのではなく、リダイレクトurl画面が1秒間表示されます。 1秒後に、アプリ画面が表示されます。 このリダイレクトURL画面を回避するにはどうすればよいですか。oauthが完了した後、xamarin.authを使用してLinkedinサインインを行うと、リダイレクトURL画面が表示されないようにするにはどうすればよいですか?
私はコードの下に使用している:
var authenticator = new OAuth2Authenticator(
StringConstants.LinkedInClientId,
StringConstants.ClientSecret,
StringConstants.Scope,
new Uri(StringConstants.AuthorizeUrl),
new Uri(redirectUrl),
new Uri(StringConstants.AccessTokenUrl));
// redirectUrlは、有効なウェブサイトのURLです。上記ログインコール後
authenticator.Completed += OnAuthCompleted;
authenticator.Error += OnAuthError;
authenticator.ShowErrors = false;
var presenter = new Xamarin.Auth.Presenters.OAuthLoginPresenter();
presenter.Login(authenticator);
Iメソッドをfolowingにコールバックを取得::
void OnAuthCompleted(object sender, AuthenticatorCompletedEventArgs e)
{
Account account =
store.FindAccountsForService(DeploymentConstants.AppTitle).FirstOrDefault();
var authenticator = sender as OAuth2Authenticator;
if (authenticator != null)
{
authenticator.Completed -= OnAuthCompleted;
authenticator.Error -= OnAuthError;
}
if (e.IsAuthenticated)
{
var values = e.Account.Properties;
var access_token = values["access_token"];
Settings.AuthData = access_token;
if (account != null)
{
store.Delete(account, DeploymentConstants.AppTitle);
}
store.Save(account = e.Account, DeploymentConstants.AppTitle);
}
}
そしてさらに流れに私が呼び出しmは: は(Navigation.PopModalAsyncを待ちます)。
ご案内しています。
何を試しましたか?あなたのコードはどのように見えますか?申し訳ありませんが、これだけに基づいてお手伝いすることはできません。適切な質問をする方法については、[this](https://stackoverflow.com/help/how-to-ask)のページをご覧ください。 –
私は自分の質問を更新しました。確認してください。 – kittu