Twitter API“retweeted_status” “home_timeline”中的字段要求
我在 iPhone 应用程序中使用 MGTwitterEngine + OAuth。一切正常,但是当我使用 include_rt 选项请求 Friends_timeline 的 home_timeline 时,我没有得到 retweeted_status 字段。
dev.twitter.com/doc/get/statuses/home_timeline 响应应包含转发的“retweeted_status”结构(如示例中所示)。它描述了转发的源推文。
dev.twitter.com/console 如果您将使用 Twitter 控制台 - 您将成功获得此结构。
但我的应用程序收到此结构为空。就像“
有人见过这个吗?解决办法是什么?
PS:我找到了这个 http://www.mail-archive.com/< span class="__cf_email__" data-cfemail="e591928c91918097c881809380898a9588808b91c89184898ea5828a8a82898082978a909596cb868a88">[电子邮件受保护]/msg25383 .html 以及一些类似的讨论,但如果这是真的,那就太疯狂了。 )
谢谢。
I'm using MGTwitterEngine + OAuth in my iPhone application. All works fine, but when I'm requesting home_timeline of friends_timeline with include_rt option I'm not getting retweeted_status field.
dev.twitter.com/doc/get/statuses/home_timeline
Responce should contain "retweeted_status" structure for retweets (as you can see in the sample). It describes source tweet that was retweeted.
dev.twitter.com/console
If you will use Twitter Console - you will get this structure successfully.
But my app recieves this structure as empty. Like " < retweeted_status>\n< /retweeted_status>".
All requests are working great except this.
Have anyone seen this? What's the solution?
PS: I've find this
http://www.mail-archive.com/[email protected]/msg25383.html
and a few similar discussions, but this is madness if it is true. )
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经找到答案了。就是这么简单。
SAOAuthTwitterEngine 引擎使用 MGTwitterEngine,但允许其使用 OAuth。
但这个引擎使用的是2008年创建的MGTwitterEngine,当时MGTwitterEngine不知道“retweeted_status”,因为这个功能是后来出现的。
反正。
我需要做的就是 - 如果为
命名空间URI:(NSString *)命名空间URI 限定名称:(NSString *)限定名称
属性:(NSDictionary *)attributeDict
和
MGTwitterStatusesParser.m 中的namespaceURI:(NSString *)namespaceURI QualifiedName:(NSString *)qName
方法与 [elementName isEqualToString:@"status"] 情况类似。
I've found the answer. It was so simple.
SAOAuthTwitterEngine engine uses MGTwitterEngine but allows it to use OAuth.
But this engine is using MGTwitterEngine created in 2008, when MGTwitterEngine didn't know about "retweeted_status" because this feature appeared later.
Anyway.
All I was need to do - if to add [elementName isEqualToString:@"retweeted_status"] case for
namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName
attributes:(NSDictionary *)attributeDict
and
namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
methods in MGTwitterStatusesParser.m similarly to [elementName isEqualToString:@"status"] case.