开发者

DotNetOpenAuth SignInWithTwitter sample doesn't work

I use DotNetOpenAuth 3.4.7 with valid consumer key and secret. When I try to sign in with twitter on localhost (\Samples\OAuthConsumer\SignInWithTwitter.aspx) it crashes with following exception.

The remote server returned an error: (401) Unauthorized. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Net.WebException: The remote server returned an error: (401) Unauthorized.

Source Error: 


Line 190:           }
Line 191:           Uri callback = MessagingUtilities.GetRequestUrlFromContext().StripQueryArgumentsWithPrefix("oauth_");
Line 192:           var request = TwitterSignIn.PrepareRequestUserAuthorization(callback, null, redirectParameters);
Line 193:           return TwitterSignIn.Channel.PrepareResponse(request);
Line 194:       }

Source File: C:\Users\Andrey\Downloads\DotNetOpenAuth-3.4.7.11121\DotNetOpenAuth-3.4.7.11121\Samples\DotNetOpenAuth.ApplicationBlock\TwitterConsumer.cs    Line: 192 

TwitterConsumer latest update is Mar 07, 2010. (https://github.com/AArnott/dotnetopenid/blob/v3.4/samples/DotNetOpenAuth.ApplicationBlock/TwitterConsumer.cs)

Is this sample st开发者_Python百科ill alive?


It's my bad. I didn't specify the callback url in app profile.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜