TwitterResponse 导致 Silverlight 挂起
每当我尝试发出任何 Twitter 请求时,我的应用程序总是挂起。但这不适用于 oAuthUtility,我已成功授权用户使用我的应用程序,但每当我发出请求时,它就会挂起。以下是我发出的挂起请求之一:
Dim response As TwitterResponse(Of TwitterStatus) = TwitterStatus.Update(myFire_tokens.Tokens, TextBox1.Text)
If response.Result <> RequestResult.Success Then
MessageBox.Show(response.ErrorMessage, "Error", MessageBoxButton.OK)
Else
MessageBox.Show("Tweet Sent", "Awesome!", MessageBoxButton.OK)
End If
此挂起发生在版本 2.4 上,并发布:504、516 和 523。在 Silverlight 5 和 4 上。我认为问题在于 TwitterResponse,因为该方法确实被调用(对于例如,如果我运行上面的代码,推文就会发布),因为我可以在 Fiddler 中看到 OK 响应。
调试器中不会引发任何异常,应用程序只是挂起。
Whenever I try and make any Twitter request, my application always hangs. This does not apply to the oAuthUtility though, I have successfully authorized the user to use my application, but whenever I make a request it just hangs. Here is one of the requests I am making that hangs:
Dim response As TwitterResponse(Of TwitterStatus) = TwitterStatus.Update(myFire_tokens.Tokens, TextBox1.Text)
If response.Result <> RequestResult.Success Then
MessageBox.Show(response.ErrorMessage, "Error", MessageBoxButton.OK)
Else
MessageBox.Show("Tweet Sent", "Awesome!", MessageBoxButton.OK)
End If
This hang occurs on Version 2.4, and releases: 504, 516, and 523. On Silverlight 5 and 4. The problem I belive lies with TwitterResponse because the method does get called (For example if I ran the above code, the tweet would post) because I can see a OK response in Fiddler.
No exceptions are thrown in the debugger, the application just hangs.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该链接到 SilverlightAsync 项目。
如果您在 Silverlight 端,它会使用此签名:
注意到附加的两个参数吗?
你的代码应该是这样的
You should link against the SilverlightAsync project.
If you are on the Silverlight-side, it would have used this signature:
notice the additional two parameters?
Your code should look something like this