Hi all,
I'm facing a peculiar problem getting newer or older tweets from my
iphone application. I would appreciate if someone can help me out with
this problem.
Here is my function that I am calling to get old tweets using max_id
and count
-(void)LoadOldTweets
{
getUrl = HOME_URL;
//NSLog(@"The Get URL is : %@",getUrl);
NSString *tempStr = [NSString stringWithFormat:@"%@",[arr_Id
objectAtIndex:([arr_Id count]-1)]];
// NSLog(@"The Temp Str is : %@",tempStr);
// getUrl = [getUrl stringByAppendingString:[NSString
stringWithFormat:@"%@",tempStr]];
// NSLog(@"The Get URL is : %@",getUrl);
// getUrl = [getUrl
stringByAppendingString:@"&count=20&include_entities=1&contributor_details=true"];
NSDictionary *params = [NSDictionary
dictionaryWithObjectsAndKeys:tempStr,@"max_id",@"20",@"count", nil];
NSString *oAuthValue = [appDelegate.oAuth
oAuthHeaderForMethod:@"GET" andUrl:getUrl andParams:params];
// ASIHTTPRequest *request = [[ASIHTTPRequest alloc]
// initWithURL:[NSURL
URLWithString:getUrl]];// [NSString
//
stringWithFormat:@"%...@?count=%@",
//
getUrl,
//
[params valueForKey:@"count"]]]];
ASIHTTPRequest *request = [[ASIHTTPRequest alloc]
initWithURL:[NSURL URLWithString:
[NSString
stringWithFormat:@"%...@?max_id=%@&count=20",
getUrl,
tempStr
]]];
//[request addRequestHeader:@"Authorization" value:oAuthValue];
[request startSynchronous];
gotOldTweets = [[request responseString] JSONValue];
NSLog(@"the Response is %@",gotOldTweets);
[request release];
}
I am also not able to get newer tweets when I replace max_id with
since_id.
Regards,
Ved
--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group:
http://groups.google.com/group/twitter-development-talk