getUserTimeLineFor:sinceId 不返回最新推文
我想获取特定推文/时间之后发布的最新推文。我正在使用 iOS 版 MGTwitterEngine。
我像这样获取最后一条推文的 ID(变量 statusId),
- (void)statusesReceived:(NSArray *)statuses forRequest:(NSString *)connectionIdentifier`
{
NSMutableDictionary *statusDict = [NSMutableDictionary dictionaryWithDictionary:[[Shared sharedInstance].tweets objectAtIndex:i]];
NSString *idstr = [statusDict valueForKey:@"id"];
statusId = unsigned long version of idstr using NSNumberFormatter;
}
我将此 statusId 存储为全局变量,当我调用它时,
-(void) getTweets
{
[twitterEngine getUserTimelineFor:title sinceID:statusId startingAtPage:0 count:20];
}
它会再次返回旧推文,而不是在最后一条推文之后发布的新推文。
另外,当我对存储的 statusID 和 ID 的字符串值执行 NSLog 时,它们会被打印不同(即使根据文档,两者都应该是无符号长)
有人可以让我知道如何在特定推文之后发布推文吗/时间?
谢谢。
这个问题有没有解决办法。我昨天发布了这个问题,从那以后没有回复。
I want to get latest tweets posted after a particular tweet/time. I'm using MGTwitterEngine for iOS.
I fetch the id of the last tweet posted like this (variable statusId)
- (void)statusesReceived:(NSArray *)statuses forRequest:(NSString *)connectionIdentifier`
{
NSMutableDictionary *statusDict = [NSMutableDictionary dictionaryWithDictionary:[[Shared sharedInstance].tweets objectAtIndex:i]];
NSString *idstr = [statusDict valueForKey:@"id"];
statusId = unsigned long version of idstr using NSNumberFormatter;
}
I store this statusId as a global variable and again when I call
-(void) getTweets
{
[twitterEngine getUserTimelineFor:title sinceID:statusId startingAtPage:0 count:20];
}
it returns the old tweets and not new ones posted after the last tweet.
Also when I do an NSLog of the statusID stored and the string value of the ID, they are printed different (even though according to docs, both should be unsigned long)
Can someone please let me know how to get tweets posted after a specific tweet/time?
Thanks.
Is there no solution t this problem. I posted the problem yesterday and since then no reply has come.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了获取最新的推文,statusID 必须是 unsigned long long。
In order to get the latest tweets statusID has to be a unsigned long long.