问题标签 [tweetsharp]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1351 浏览

c# - 从 MongoDB Enumerable 反序列化为 ICollection

我在 MongoDB 中反序列化 TwitterStatus 类时遇到以下问题,这是使用 MongoDB C# 驱动程序 1.8.0.124 和 TweetSharp 2.0 的失败单元测试:

抛出的异常是Enumerable class TwitterEntities does not implement ICollection<T> so it can't be deserialized,下面的完整堆栈跟踪。

完整的堆栈跟踪:

如果没有此异常,如何从 mongoDB 反序列化 TweetStatus 类?作为参考,有TwitterEntity 类

0 投票
1 回答
263 浏览

c# - 无法从任何 twitter api 获取结果,其中 OAuth 凭据使用 tweetsharp 为 1.1 版获得

我正在使用带有 twitter 版本 1.1 的 tweetsharp 来访问来自 twitter 的数据。我可以从我的应用程序(Asp.net Web 应用程序)使用 OAuth 登录。我将令牌和令牌秘密存储在 cookie 中,当我尝试访问任何 twitter api 时,例如,/statuses/oembed.json?id=xxxxx我什么也没得到。这发生在我的服务器上。但是当我调试应用程序时,一切都按预期工作。我怀疑我的 Twitter 帐户中“我的应用程序”部分的设置有问题。或者身份验证方法有问题。

在我的推特帐户的“我的应用程序”部分,我提供了以下详细信息:

授权有效。但我无法从 api 获取数据。

0 投票
0 回答
215 浏览

c# - 从 WP7 WebControl 检索 twitter 验证程序代码

我一直在为 windows phone 开发一个相当基本的 twitter 应用程序,并且在登录过程中遇到了一个问题。我正在使用 tweetsharp api,对此我没有任何问题。我一直在关注本教程:http: //mobile.tutsplus.com/tutorials/windows/wp7-integrating-twitter-with-your-app/

问题是,一旦用户授予我的应用程序权限,我就无法从 WebControl 读取验证程序代码并完成身份验证过程。我不想让用户复制代码并粘贴回我的应用程序,因为这会妨碍用户体验,而且我从未见过手机上的 twitter 应用程序会这样做。我想我已经找到了问题,但我不确定如何解决它L

以下是从验证页面解析 AbsoluteUri 以获取验证者代码的代码:

这是调用解析方法的代码:

这是验证者页面的 AbsoluteUri:https ://api.twitter.com/oauth/authorize

AbsoluteUri 不包含验证码!我相信这是问题所在,因为教程中的代码假定验证程序代码在页面的 AbsoluteUri 中。我查看了页面的 html,希望通过它解析以检索验证器,但不幸的是 twitter 隐藏了它。有没有人有任何建议或解决方法来解决这个问题?如果我绝对需要,我可以申请 xauth 访问权限,但我将其保存为最后的手段。如果有人想查看 html 代码,请询问,我可以尝试发布。非常感谢任何帮助!

谢谢, 挤压

0 投票
1 回答
525 浏览

twitter - .NET - Update status (tweet) to Twitter without PIN or real Callback url?

I'm trying to write an app that can tweet using an 'application' I registered with Twitter. I am using TweetSharp and have tried to get my TwitterService set up as follows:

It gets to the OAuthAccessToken line and then takes me to the Authorize [my app] to use your account? page on the Twitter website. Before I specified a phony callback url, it displayed a page with the PIN that my user is supposed to enter when I clicked the 'Authorize app' button. Then when I added a phony callback url, it would attempt to go to that page and my code would blow to smithereens with the following error:

The remote server returned an error: (401) Unauthorized.

What I want to know is: can I tweet programatically without the need to enter a PIN or have a legitimate callback url?

0 投票
1 回答
768 浏览

c# - 吊床包、Tweetsharp 和 C# Windows Phone 8

我跟着这个链接

http://samjarawan.blogspot.co.uk/2010/09/building-real-windows-phone-7-twitter_18.html

一步一步地,当我运行我的应用程序时,我收到一个错误,即“错误调用 Twitter”。

当我搜索它时,我发现在这部分代码中

我需要做一些改变,但是什么地方都没有找到。我得到的另一个答案是我需要更新 Hammock 和 Tweetsharp,但它已经更新了。请建议我并帮助我。

0 投票
1 回答
5283 浏览

c# - 如何使用 tweetsharp.search?

我正在使用 TweetSharp,但无法使用“搜索”功能。我试图找到它,但在每个例子中,我看到第二个参数是一个整数,它不起作用。

我无法找到插入第二个参数的方法,即:

谁能帮我?

0 投票
1 回答
665 浏览

c# - 使用 MVC4 时出现 tweetsharp 过载错误 - Internet 应用程序模板

当您安装 tweetsharp nuget packack 并使用 Internet 应用程序模板创建新的 mvc4 Internet 项目时,它会在service.VerifyCredentials() 上给我和错误消息;

}

错误:方法 'VerifyCredentials' 没有重载需要 0 个参数

如果我不使用 Internet 应用程序模板,它可以正常工作。谁能告诉我为什么会发生这种情况以及解决方案?

0 投票
1 回答
2052 浏览

c# - TweetSharp 使用 PhotoChooserTask 和 SendTweetWithMedia 上传图像

我正在尝试在Twitter上上传一张PhotoChooserTask 捕捉他的照片。我遇到的问题是我不知道如何传递BitmapImage,这是我选择图像并将其传递给Stream时的格式。

以下是我的代码示例:

0 投票
2 回答
2400 浏览

c# - Tweetsharp 搜索功能

我已经编写了一小段代码,但无法弄清楚我哪里出错了。我要做的就是使用 tweetsharp 在 twitter 上执行搜索并返回结果。

这是代码:

0 投票
1 回答
251 浏览

windows-phone-7 - TweetSharp 'GetRequestToken' 在 Windows Phone 7.1 上不返回任何令牌

我正在尝试使用 TweetSharp 在我的应用中将图片分享到 Twitter,代码如下:

但是当调用 twitterProcessRequestToken 时,它token是 null 并且response.StatusCode是“未找到”。

因为我现在在中国,而且政府已经禁止通过 GFW 访问Twitter.com,所以我必须设置代理才能访问Twitter.com。我不知道代理是否会导致这个问题。但是我可以使用集成在 WP7 中的 IE 访问 Twitter。

那么我该如何解决这个问题呢?