How to open twitter login page from iOS application

主宰稳场 提交于 2019-12-25 02:25:51

问题


I am developing an twitter application in which i have to create login page in application just like Facebook login dialog come.I tried STTwitter using this we have to add the twitter username and password in settings.Is there is any way to login twitter from iOS application.

This is my code

    - (IBAction)loginWithiOSAction:(id)sender {

    self.twitter = [STTwitterAPI twitterAPIOSWithFirstAccount];

    _loginStatusLabel.text = @"Trying to login with iOS...";
    _loginStatusLabel.text = @"";

    [_twitter verifyCredentialsWithSuccessBlock:^(NSString *username) {

        _loginStatusLabel.text = username;

    } errorBlock:^(NSError *error) {
        _loginStatusLabel.text = [error localizedDescription];
    }];

}

回答1:


No, you don't need to add the Twitter credentials in iOS Settings.

STTwitter comes with a project named STTwitterDemoiOS.

This project shows how to login through the Twitter login page.



来源:https://stackoverflow.com/questions/24548534/how-to-open-twitter-login-page-from-ios-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!