Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.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
Youtube api YouTube数据API(Java)CommentSnippet.getAuthorGoogleplusProfileUrl()返回null_Youtube Api_Youtube Data Api - Fatal编程技术网

Youtube api YouTube数据API(Java)CommentSnippet.getAuthorGoogleplusProfileUrl()返回null

Youtube api YouTube数据API(Java)CommentSnippet.getAuthorGoogleplusProfileUrl()返回null,youtube-api,youtube-data-api,Youtube Api,Youtube Data Api,我提取了大量YouTube评论,用于特定的研究目的。随着评论,我能够提取作者显示名称,但当我试图提取谷歌加配置文件URL的作者,它是返回空的所有作者超过10000条评论!我做错了什么?有没有其他方法将youtube评论员链接到google+个人资料 if(!snippet.isEmpty()) { pw.println(" - Author: " + snippet.getAuthorDisplayName());//works fine pw.println(" - Com

我提取了大量YouTube评论,用于特定的研究目的。随着评论,我能够提取作者显示名称,但当我试图提取谷歌加配置文件URL的作者,它是返回空的所有作者超过10000条评论!我做错了什么?有没有其他方法将youtube评论员链接到google+个人资料

if(!snippet.isEmpty())
{
    pw.println("  - Author: " + snippet.getAuthorDisplayName());//works fine
    pw.println("  - Comment: " + snippet.getTextDisplay()); //works fine
    //the following line always returns null!
    pw.println("  - Google+ Profile URL: " + snippet.getAuthorGoogleplusProfileUrl()); //always returns null
    pw.println("  - Author Channel ID: " + snippet.getAuthorChannelId()); //works fine
    pw.println("  - Author Channel URL: " + snippet.getAuthorChannelUrl());//works fine
    pw.println("\n-------------------------------------------------\n");
}
//pw: a PrintWriter object
//snippet: a CommentSnippet object
请帮忙!我完全被困在这个。。。
问候

自2016年6月13日以来,该方法似乎已被弃用


查看的答案。

似乎该方法自2016年6月13日起就被弃用了


检查的答案。

是否尝试使用getAuthorGoogleplusProfileUrl检查至少一个用户?检查您是否错误地实施了它。检查
getAuthorGoogleplusProfileUrl
将返回一个值,如果没有,则返回null。希望有帮助!谢谢@Rebot先生的回复。我检查了一次又一次,但没有弄清楚是什么问题。我也查阅了文件。你能推荐其他方式将YouTube评论员与Google+个人资料连接起来吗?注意。是否尝试使用getAuthorGoogleplusProfileUrl检查至少一个用户?检查您是否错误地实施了它。检查
getAuthorGoogleplusProfileUrl
将返回一个值,如果没有,则返回null。希望有帮助!谢谢@Rebot先生的回复。我检查了一次又一次,但没有弄清楚是什么问题。我也查阅了文件。你能推荐其他方式将YouTube评论员与Google+个人资料连接起来吗?当做