Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iOS、Twitter ID和通过解析注册_Twitter_Ios7_Oauth_Parse Platform - Fatal编程技术网

iOS、Twitter ID和通过解析注册

iOS、Twitter ID和通过解析注册,twitter,ios7,oauth,parse-platform,Twitter,Ios7,Oauth,Parse Platform,在注册过程中,我尝试将数字twitter ID转换为普通用户名,而不是随机字母 我使用Parse作为后端 - (IBAction)twitterSignup:(id)sender { [PFTwitterUtils logInWithBlock:^(PFUser *user, NSError *error) { if (![PFTwitterUtils isLinkedWithUser:user]) { [PFTwitt

在注册过程中,我尝试将数字twitter ID转换为普通用户名,而不是随机字母

我使用Parse作为后端

- (IBAction)twitterSignup:(id)sender {


        [PFTwitterUtils logInWithBlock:^(PFUser *user, NSError *error) {
            if (![PFTwitterUtils isLinkedWithUser:user]) {
                [PFTwitterUtils linkUser:user block:^(BOOL succeeded, NSError *error) {
                    if ([PFTwitterUtils isLinkedWithUser:user]) {
                        NSLog(@"User logged in with Twitter!");
                    }
                }];
            }
            if (!user) {
                NSLog(@"The user cancelled the Twitter login.");
                return;
            } else if (user.isNew) {
                NSLog(@"User signed up and logged in with Twitter!");
            } else {
                NSLog(@"User logged in with Twitter!");

要获取屏幕名称,请执行以下操作:

NSString *twitterScreenName = [PFTwitterUtils twitter].screenName;

你的问题是什么?你有错误吗?没有,没有错误。但是在解析过程中,twitter id变成了数字和字母。我想要真实的twitter名称。谢谢。这管用!NSString*twitterScreenName=[PFTwitterUtils twitter].screenName;[[PFUser currentUser]setObject:twitterScreenName forKey:@“username”];[[PFUser currentUser]saveInBackground];