简体   繁体   English

MGTwitterEngine获取提要-iPhone

[英]MGTwitterEngine getting feeds - iPhone

So, in my app, I am trying to use MGTwitterEngine to read from a certain user on Twitter, and then log the recent posts in an array. 因此,在我的应用程序中,我尝试使用MGTwitterEngine从Twitter上的某个用户读取内容,然后将最近的帖子记录在数组中。 Is it possible to do this with this library? 是否可以使用此库执行此操作? I am trying to do this without logging in. Any help would be appreciate, thank you! 我正尝试在不登录的情况下执行此操作。不胜感激,谢谢!

It can be easily done with MGTwitterEngine . 可以使用MGTwitterEngine轻松完成。 You do it this way: 您可以这样进行:

MGTwitterEngine *twitterng = [[MGTwitterEngine alloc] initWithDelegate:self];
[twitterng getUserTimelineFor:@"userName" sinceID:0 startingAtPage:0 count:8];

and it will call delegate method 它将调用委托方法

- (void)statusesReceived:(NSArray *)statuses forRequest:(NSString *)connectionIdentifier

Hope this helps. 希望这可以帮助。

You need to get the feed url that contains the rss feeds. 您需要获取包含rss提要的提要URL。 You don't need to login for that. 您无需为此登录。 Use MGTwitterEngine to get the tweets and set them into array. 使用MGTwitterEngine获取推文并将其设置为数组。 Then you simply need to reload the tableview. 然后,您只需要重新加载tableview。

Hope this helps. 希望这可以帮助。

Thanks, 谢谢,

Madhup 马杜普

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM