2014-08-30 17 views
1

我試圖用下面的代碼與Instagram的我的應用程序集成:登錄Instagram的陷入無限「沙漏」(WP8.1 C#)

 string startUrl = "https://instagram.com/oauth/authorize/?client_id=" + InstagramApiKey + "&redirect_uri=http://none&response_type=token"; 
     string endUrl = "http://none"; 

     Uri startUri = new System.Uri(startUrl); 
     Uri endUri = new System.Uri(endUrl); 

     WebAuthenticationBroker.AuthenticateAndContinue(startUri, endUri); 

和代碼我的應用程序的最後一行之後顯示了Instagram登錄頁面,但在它向我顯示登錄名和密碼字段之前它就卡住了。 我錯過了什麼嗎? 謝謝。

回答

1

你的問題是,在最後一行是低於

WebAuthenticationResult WebAuthenticationResult = await WebAuthenticationBroker.AuthenticateAsync(WebAuthenticationOptions.None, **startUri, endUri**); 
if (WebAuthenticationResult.ResponseStatus == WebAuthenticationStatus.Success) 
{ 
} 
+0

爲例plz幫助我也即時通訊也有同樣的問題,我讓Instagram的登錄,但不知道下一步如何 公共無效ContinueWebAuthentication(WebAuthenticationBrokerContinuationEventArgs參數) { WebAuthenticationResult result = args.WebAuthenticationResult; if(result.ResponseStatus == WebAuthenticationStatus.Success) { } 像facebook一樣,我們使用facebookclint。 ParseOAuthCallbackUrl(回調); – 2014-12-31 08:36:46