如何从iOS应用程序打开twitter登录页面 [英] How to open twitter login page from iOS application

查看:1230
本文介绍了如何从iOS应用程序打开twitter登录页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Twitter应用程序,我必须在应用程序中创建登录页面就像Facebook登录对话框一样。我试过STTwitter使用这个我们必须在设置中添加twitter用户名和密码。有没有办法登录来自iOS应用程序的推特。

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.

这是我的代码

    - (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];
    }];

}


推荐答案

不,你不需要在iOS设置中添加Twitter凭据。

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

STTwitter 附带一个名为的项目STTwitterDemoiOS

此项目显示如何通过Twitter登录页面登录。

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

这篇关于如何从iOS应用程序打开twitter登录页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆