未将对象引用设置到实例 - Twitterizer
我正在尝试使用 Twitterizer API 获取推文的转发。
Dim accessToken As Twitterizer.OAuthTokens = New Twitterizer.OAuthTokens()
accessToken.AccessToken = 'XXXXXXXXXXXXXXXXXXXX'
accessToken.AccessTokenSecret = 'XXXXXXXXXXXXXXXXXXXX'
accessToken.ConsumerKey = 'XXXXXXXXXXXXXXXXXXXX'd
accessToken.ConsumerSecret = 'XXXXXXXXXXXXXXXXXXXX'
Dim retweets As Twitterizer.TwitterResponse(Of Twitterizer.TwitterStatusCollection) = Twitterizer.TwitterStatus.Retweets(accessToken , '1234567')
代码中的最后一行给出“对象引用未设置为对象的实例”。 Retweets 方法是公共共享方法,因此无需将 TwitterStatus 类声明为新的 TwitterClass 即可访问它。我哪里做错了?
更新: StackTrace:
在 C:\ProjectFiles\twitterizer\Twitterizer2\Methods\Tweets\RetweetsCommand.cs 中的 Twitterizer.Commands.RetweetsCommand.Init() 处:Twitterizer.Core.CommandPerformer1.PerformAction(ICommand
处的第 83 行1 个命令)位于 C:\ProjectFiles\twitterizer\Twitterizer2\Core\CommandPerformer.cs:第 54 行,位于 C:\ProjectFiles\twitterizer\Twitterizer2\Methods\Tweets 中的 Twitterizer.TwitterStatus.Retweets(OAuthTokens tokens, Decimal statusId, RetweetsOptions options) \TwitterStatus.cs:位于 C:\ProjectFiles\twitterizer\Twitterizer2\Methods\Tweets\TwitterStatus.cs 中的 Twitterizer.TwitterStatus.Retweets(OAuthTokens tokens, Decimal statusId) 中的第 327 行:位于 Modules_Social_TwitterMessages.RefreshTwitterMessages() 中的第 339 行
I am trying to get retweets of a tweet using Twitterizer API.
Dim accessToken As Twitterizer.OAuthTokens = New Twitterizer.OAuthTokens()
accessToken.AccessToken = 'XXXXXXXXXXXXXXXXXXXX'
accessToken.AccessTokenSecret = 'XXXXXXXXXXXXXXXXXXXX'
accessToken.ConsumerKey = 'XXXXXXXXXXXXXXXXXXXX'd
accessToken.ConsumerSecret = 'XXXXXXXXXXXXXXXXXXXX'
Dim retweets As Twitterizer.TwitterResponse(Of Twitterizer.TwitterStatusCollection) = Twitterizer.TwitterStatus.Retweets(accessToken , '1234567')
The last line in the code is giving me "Object Reference is not set to an instance of the object". Retweets method is public shared method and hence there is no need to declare the TwitterStatus class as new TwitterClass in order to access it. Where am I doing wrong?
UPDATE:
StackTrace:
at Twitterizer.Commands.RetweetsCommand.Init() in C:\ProjectFiles\twitterizer\Twitterizer2\Methods\Tweets\RetweetsCommand.cs:line 83 at Twitterizer.Core.CommandPerformer1.PerformAction(ICommand
1 command) in C:\ProjectFiles\twitterizer\Twitterizer2\Core\CommandPerformer.cs:line 54 at Twitterizer.TwitterStatus.Retweets(OAuthTokens tokens, Decimal statusId, RetweetsOptions options) in C:\ProjectFiles\twitterizer\Twitterizer2\Methods\Tweets\TwitterStatus.cs:line 327 at Twitterizer.TwitterStatus.Retweets(OAuthTokens tokens, Decimal statusId) in C:\ProjectFiles\twitterizer\Twitterizer2\Methods\Tweets\TwitterStatus.cs:line 339 at Modules_Social_TwitterMessages.RefreshTwitterMessages() in
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
升级到2.3.2版本后错误消失
The error is gone after upgrading to version 2.3.2