Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.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
Objective c Firebase Twitter登录属性';idToken';在类型为';FIRAuthCredential_Objective C_Firebase Authentication_Twitter Login - Fatal编程技术网

Objective c Firebase Twitter登录属性';idToken';在类型为';FIRAuthCredential

Objective c Firebase Twitter登录属性';idToken';在类型为';FIRAuthCredential,objective-c,firebase-authentication,twitter-login,Objective C,Firebase Authentication,Twitter Login,我正试图通过遵循他们的文档来实现Firebase Twitter登录 [self.provider getCredentialWithUIDelegate:nil completion:^(FIRAuthCredential *_Nullable credential, NSError *_Nullable error) { if (error) { // Hand

我正试图通过遵循他们的文档来实现Firebase Twitter登录

 [self.provider getCredentialWithUIDelegate:nil
                                   completion:^(FIRAuthCredential *_Nullable credential, NSError *_Nullable error) {
        
          if (error) {
           // Handle error.
          }
          if (credential) {
            [[FIRAuth auth] signInWithCredential:credential
                                      completion:^(FIRAuthDataResult *_Nullable authResult, NSError *_Nullable error) {
              if (error) {
                // Handle error.
              }
                //Twitter OAuth ID token can be retrieved by calling:
                //authResult.credential.idToken
                NSLog(@"%@", authResult.credential.idToken)
                
            }];
          }
    }];
然而,当我尝试访问idToken时,我得到了这个错误

在类型为“FIRAuthCredential”的对象上找不到属性“idToken”

以下是文档:

我不确定他们是否在文档中输入了错误

 [self.provider getCredentialWithUIDelegate:nil
                                   completion:^(FIRAuthCredential *_Nullable credential, NSError *_Nullable error) {
        
          if (error) {
           // Handle error.
          }
          if (credential) {
            [[FIRAuth auth] signInWithCredential:credential
                                      completion:^(FIRAuthDataResult *_Nullable authResult, NSError *_Nullable error) {
              if (error) {
                // Handle error.
              }
                //Twitter OAuth ID token can be retrieved by calling:
                //authResult.credential.idToken
                NSLog(@"%@", authResult.credential.idToken)
                
            }];
          }
    }];
如果提供的代码不起作用,我如何访问idToken