2011-06-29 20 views
0

我想要得到最新的推文發佈後特定的推文/時間。我爲iOS使用MGTwitterEngine。getUserTimeLineFor:因爲沒有返回最新的推文

我取的最後的鳴叫張貼這樣的(可變statusId)的ID

- (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]; 
} 

它返回舊推文,而不是在最後一條推文後發佈的新消息。

此外,當我做一個NSLog的存儲statusID和ID的字符串值,在打印不同(儘管根據文檔,都應該是無符號長)

可有人請讓我知道如何在特定推文/時間之後發佈推文?

謝謝。

有沒有解決這個問題。我昨天發佈了這個問題,從那時起沒有回覆。

回答

0

爲了得到最新的推文statusID必須是一個無符號long long。