问题标签 [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.
c# - 如何将本地服务器用于 tweetsharp 应用程序
我制作了一个关于通过 tWitter 对用户进行身份验证的演示。
我想回调到这个网址http://localhost:56501/home/authorize.
当我尝试在我的应用程序设置中设置此 url 时,它不起作用。我收到 url 无效的错误。
有人帮助我让它在我身边工作。
我已经从这里运行了一些代码https://github.com/danielcrenna/tweetsharp
c# - Tweetsharp:检索特定用户的推文列表
在官方 TS 文档、其他 Tweetsharp SO 帖子或挖掘图书馆的类中找不到这个;所以我想我会问。您如何使用 Tweetsharp 从特定用户那里检索最新推文列表?
您可以假设我正在使用关注我想要检索的推文的用户的帐户进行身份验证。我什至可以使用用户本身的帐户进行身份验证。
c# - 从 Twitter 获取公共数据时出错
为什么它给出了 foreach 循环中不能转换字符串类型的错误?这是我的全部代码
这是我正在处理的整个代码,并且在 foreach 循环中只遇到一个错误,这是我缺乏 C# 知识
c# - 使用 tweetsharp 在 Twitter 上进行特定搜索
它给了我这样的输出
即使我的代码运行没有错误,它也不会返回我的推文
c# - 使用 C# 获取公共推文
我使用此代码获取有关 ghaza 的推文有两件事我想知道
- 我应该怎么做才能得到
json
结果 - 这在开始时给了我一些奇怪的输出,例如:
在迭代了一段时间之后,它向我展示了我想要json
格式化的推文
我用这个:
但它不起作用。
c# - 使用 ID 和密码使用 TweetSharp 登录
所以我可以使用这个脚本来获取所有转发,但来自哪个用户?我想我应该首先使用正确的凭据进行授权。那么我该怎么做呢?用户应输入他/她的 ID 和密码登录。
json - 反序列化 JSON TweetSharp TwitterStatus
我正在使用 Daniel Crenna 的 TweetSharp http://github.com/danielcrenna/tweetsharp
要将 TwitterStatus 序列化为文件,我使用代码
产生文本
{"Id":288653019971727360,"InReplyToUserId":null,"InReplyToStatusId":null,"InReplyToScreenName":null,"truncated":false,"favorited":false,"Text":"Found the bug, dear old regular expressions","Source":"web","User":{"Id":1148081,"FollowersCount":793,"Name":"Tim Regan","Description": [...]
(注意,我不会全部包括在内,除非这有助于诊断?)
我反序列化 TwitterStatus 的代码行是
但这给出了错误
System.InvalidCastException was unhandled
HResult=-2147467262
Message=Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type 'TweetSharp.TwitterStatus'.
Source=TweetColorMVVM
StackTrace:
at TweetColorMVVM.Model.Tweets.LoadSavedTweets(String screenName) in c:\TFSCML\Users\Tim\MSR.Makefest\TwitterColor\TweetColorMVVM\Model\Tweets.cs:line 132
at TweetColorMVVM.Model.Tweets.LoadTweets(Object state) in c:\TFSCML\Users\Tim\MSR.Makefest\TwitterColor\TweetColorMVVM\Model\Tweets.cs:line 78
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
谁能看到我做错了什么?
tweetsharp - 在 TweetSharps ListTweetsOnSpecifiedUserTimeline 中使用 max_id 进行分页与游标
在http://dev.twitter.com/docs/working-with-timelines上的“使用时间线”文档中, Twitter 建议使用max_id
参数进行光标定位,而不是尝试逐页浏览时间线。查看 Twitter API 方法的文档GET statuses/user_timeline
http://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline有一个可选max_id
参数、无page
参数和其他有用的参数,例如include_rts
包括转推。但是 TweetSharp 方法的重载ListTweetsOnSpecifiedUserTimeline
只包括page
而不是max_id
. 是否可以使用 TweetSharp 使用光标方法(而不是分页)检索指定的用户时间线,如果可以,如何?
c# - % 使用 Tweetsharp 登录 Twitter 帖子会导致 401 Unauthorized
我有一段简单的代码可以发送一条推文。保留带有 % 符号的消息会导致 401 Unauthorized 错误:
如果我通过 TweetDeck 或直接使用 Twitter 页面发送相同的消息,它会毫无问题地发布。有任何想法吗?
c# - 如何使用 TweetSharp 对 Twitter 进行身份验证
我创建了一个新应用程序,并在 Twitter 上注册了它,以获取使用者密钥、使用者密钥秘密、令牌和令牌秘密。然后我添加了对 TweetSharp 的引用。接下来,我使用了来自https://github.com/danielcrenna/tweetsharp的代码,上面写着“验证客户端应用程序(即桌面)”。
它总是打开的页面在标题栏中没有键。我注意到步骤 1 中的 oAuthRequestToken 有两个用于令牌/令牌机密的属性,但都没有设置。所以我手动添加了行来设置这两个。我又试了一次。这次在浏览器中打开的 Url 看起来是完整的。
我所看到的只是“哇!这个页面的请求令牌无效。它可能已经被使用过,或者因为它太旧而过期。请返回将您发送到这里的站点或应用程序,然后重试;它可能只是一个错误。”
我已经尝试重新创建令牌,并发送密钥和令牌以防我不理解它。我完全迷路了。刚开始不可能这么难!
有任何想法吗?