Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/9.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
Api 飘动谷歌“登录”;选择“帐户”;不列出Youtube品牌帐户?_Api_Flutter_Google Api_Google Signin - Fatal编程技术网

Api 飘动谷歌“登录”;选择“帐户”;不列出Youtube品牌帐户?

Api 飘动谷歌“登录”;选择“帐户”;不列出Youtube品牌帐户?,api,flutter,google-api,google-signin,Api,Flutter,Google Api,Google Signin,我目前正在与 到目前为止,它可以正常工作,但在Google登录弹出窗口中,我在“Choose account”中没有看到我的Youtube品牌帐户,因此,Youtube数据API无法正确识别带有参数“mine=true”的API调用,因为如果我选择我的Google帐户,它与Youtube帐户没有连接 在Youtube数据API的文档中,如果我在那里“立即尝试”,谷歌登录会在我选择我的谷歌帐户后列出我的Youtube品牌帐户 使用过的软件包: Flutter 2.0.1 Dart 2.12.0 g

我目前正在与

到目前为止,它可以正常工作,但在Google登录弹出窗口中,我在“Choose account”中没有看到我的Youtube品牌帐户,因此,Youtube数据API无法正确识别带有参数“mine=true”的API调用,因为如果我选择我的Google帐户,它与Youtube帐户没有连接

在Youtube数据API的文档中,如果我在那里“立即尝试”,谷歌登录会在我选择我的谷歌帐户后列出我的Youtube品牌帐户

使用过的软件包:

Flutter 2.0.1
Dart 2.12.0
google_sign_in: 5.0.0
示例代码(firebase和API Explorer的权限已设置并生效):

有什么帮助吗,所以我可以在谷歌登录过程中通过屏幕选择Youtube品牌帐户

另请参见

尝试从以下位置删除:

作用域:['https://www.googleapis.com/auth/youtube']);

这是我的猜测。

这有帮助吗?不,正如你在上一条评论中看到的,谷歌和youtube账户之间没有联系,所以我猜,他也不能选择他的youtube品牌账户。我不知道你想要实现什么不同,但不,它不起作用,我认为代码中的代码不会编译。为什么在那里?但不管怎样。。。我打赌问题与这行代码有关——由于某些格式问题,作用域没有成功应用。
final GoogleSignIn _googleSignIn = GoogleSignIn(
  signInOption: SignInOption.standard, // not necessary
  scopes: <String>['https://www.googleapis.com/auth/youtube']);
...
this._googleSignIn.onCurrentUserChanged.listen((GoogleSignInAccount account) {}
...
this._googleSignIn.signIn();
...
http.get(
    Uri.parse(
 'https://www.googleapis.com/youtube/v3/channels?part=id,snippet,contentDetails&mine=true'),
 headers: await currentGoogleUser.authHeaders);
scopes: <String>['https://www.googleapis.com/auth/youtube']);