0

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.

Aisha
  • 1,559
  • 5
  • 20
  • 37

1 Answers1

0

In order to get the latest tweets statusID has to be a unsigned long long.

ms83
  • 1,804
  • 16
  • 13