【问题标题】:YouTube Data API (Java) CommentSnippet.getAuthorGoogleplusProfileUrl() returns nullYouTube 数据 API (Java) CommentSnippet.getAuthorGoogleplusProfileUrl() 返回 null
【发布时间】:2016-12-10 10:54:50
【问题描述】:

我正在提取大量 YouTube cmets 用于特定的研究目的。除了评论之外,我还可以提取作者显示名称,但是当我尝试提取作者的 google plus 个人资料 URL 时,它为超过 10,000 个 cmets 的所有作者返回 null!我究竟做错了什么?有没有其他方法可以将 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

请帮忙!我完全被困在这... 问候。

【问题讨论】:

  • 尝试使用 getAuthorGoogleplusProfileUrl 检查至少一位用户?检查您是否错误地实施了它。检查 document getAuthorGoogleplusProfileUrl 将返回一个值或 null 表示无。希望对您有所帮助!
  • 感谢@Mr.Rebot 的回复。我一遍又一遍地检查,但无法弄清楚问题所在。我也浏览了文档。您能否建议任何其他方式将 YouTube 评论者与 Google+ 个人资料联系起来?问候。

标签: youtube-api youtube-data-api


【解决方案1】:

似乎该方法自 2016 年 6 月 13 日起已弃用。

查看this question的答案。

【讨论】:

    猜你喜欢
    • 2019-09-20
    • 2014-01-18
    • 2019-08-11
    • 2016-11-07
    • 2021-04-13
    • 2017-08-23
    • 1970-01-01
    • 1970-01-01
    • 2022-11-08
    相关资源
    最近更新 更多