2

I want to integrate my app with twitter. I need to show tweets containing certain hashtags or from a particular user.

I tried MGTwitterEngine+xOAuth, but i want twitter tweets only so no need of authentication required. MGTwitterEngine+xOAuth needs authentication so any API or method to get tweets certain hashtags or from a particular user.

djromero
  • 19,551
  • 4
  • 71
  • 68
sarath
  • 450
  • 3
  • 15

2 Answers2

0

You can use MGTwitterEngine with search api or you can call twitter search API directly. The problems with search API is that you can only get tweets up to 14 days old. It can be as easy as: http://search.twitter.com/search.json?q=%23hello

vodkhang
  • 18,639
  • 11
  • 76
  • 110
  • thank you for your fast response ,my doubt is,is it possible to use mgtwitter engine without authentication? – sarath Nov 02 '11 at 10:26
  • how to find tweets up to one month old ? any query formation required for that ? – Moxarth Aug 31 '17 at 08:23
0

you are right, you don't neeed xOAth to make a search according to twitter search API. If you want to use MGTwitterEngine you can use one of those methods :

// Search method

- (NSString *)getSearchResultsForQuery:(NSString *)query;
- (NSString *)getSearchResultsForQuery:(NSString *)query sinceID:(MGTwitterEngineID)sinceID startingAtPage:(int)pageNum count:(int)count; // search
- (NSString *)getSearchResultsForQuery:(NSString *)query sinceID:(MGTwitterEngineID)sinceID startingAtPage:(int)pageNum count:(int)count geocode:(NSString *)geocode;

You can find more details in MGTwitterEngine.h. It seems that you don't have to set authentification parameters to make a search, you just have to create an engine :

twitterEngine = [[MGTwitterEngine alloc] initWithDelegate:self];