开发者

Twitter OAuth iPhone and Navigation Controllers

I'm new to Objective-C and iPhone programming so please bear with me. I am using the Twitter OAuth engine by bengottlieb and I can't figure out how to load the Login from a modal view or into a navigation controller.

This pushes the splash screen into the navigation controller 开发者_StackOverflow社区but nothing else happens.

SA_OAuthTwitterController *twitterVC = [[SA_OAuthTwitterController alloc] init];
[self.navigationController pushViewController:twitterVC animated: YES];

.. so I'm thinking I have to use something like this:

if(_engine)return;
    _engine = [[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self];
    _engine.consumerKey    = kOAuthConsumerKey;
    _engine.consumerSecret = kOAuthConsumerSecret;  

SA_OAuthTwitterController *twitterVC = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine:_engine delegate:self];
[self.navigationController pushViewController:twitterVC animated: YES];

(which does nothing)

Any help would be greatly appreciated.


After consulting with Ben himself, he said the twitter engine is not designed to be loaded from a modal or navigation view. My Twitter login page is not on the main view, but on a separate view so I used NSNotifications to pass data from a second view to the engine initialized on the first view.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜