使用 Twitterizer 网站上的代码示例,我正在尝试使用以下代码向 twitter 发布推文:
Dim asyncResult As IAsyncResult = TwitterStatusAsync.Update(
tokens.Tokens,
Tweet.Text,
Nothing,
Timeout,
Function(updateResponse)
If (updateResponse.Result = RequestResult.Success) Then
MessageBox.Show("Tweet Posted")
Else
MessageBox.Show("Error: " & updateResponse.ErrorMessage)
End If
End Function)
但我得到了这个例外:
System.NotSupportedException 未被用户代码处理 Message=不支持指定的方法。StackTrace:在 System.Func
4.BeginInvoke(T1 arg1, T2 arg2, T3 arg3, AsyncCallback callback, Object object) at Twitterizer.AsyncUtility.ExecuteAsyncMethod[TResponse,TProperties](OAuthTokens tokens, String s, TProperties properties, TimeSpan timeout, Func
4 方法调用,操作1 function) at Twitterizer.TwitterStatusAsync.Update(OAuthTokens tokens, String text, StatusUpdateOptions options, TimeSpan timeout, Action
1 个函数)在 myFire_Silverlight._twitter.Status_Post(mf_object_tweet Tweet) 在 myFire_Silverlight.TweetDialog.OKButton_Click(Object sender, RoutedEventArgs e) 在 System.Windows.Controls.Primitives.ButtonBase.OnClick() 在 System.Windows.Controls.Button.OnClick () 在 System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e) 在 System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e) 在 MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags) InnerException:
我究竟做错了什么?