【问题标题】:Asp.net C# using Youtube API comment on Youtube videoAsp.net C# 使用 Youtube API 评论 Youtube 视频
【发布时间】:2011-06-06 06:41:14
【问题描述】:

为什么我的评论没有通过 asp.net c# 在 youtube 上发布,我使用的是开发密钥,并且 Youtube Api.Codes 运行顺利。但是没有发表评论。我是否缺少任何评论步骤?

YouTubeRequestSettings settings = new YouTubeRequestSettings("YouTubeDemo", " ", "Dev key"); 
YouTubeRequest request = new YouTubeRequest(settings);
Comment c = new Comment(); 
c.Content = "Test Comment"; 
Video newVideo = new Video(); 
//gdata.youtube.com/feeds/api/videos/VIDEO_ID/comments;
//newVideo.VideoId = "R9dfJaOK4xM"; 
newVideo.VideoId = "gdata.youtube.com/feeds/api/videos/4wlYIN-lpEo/comments";; 
request.AddComment(newVideo, c); 

【问题讨论】:

    标签: asp.net youtube youtube-api


    【解决方案1】:

    您不必提供客户 ID 吗? 所有需要写权限的操作都需要传递Client ID和Developer Key。

    请注意,您的身份验证请求 必须指定一个 clientID 和 developerKey,两者都是 在示例代码中指定,以 检索私人提要,上传视频, 或提交 API 请求以进行写入 操作。请拜访 http://code.google.com/apis/youtube/dashboard 获取开发者密钥和客户端 身份证。

    您可以从此page获取更多信息。

    【讨论】:

    • 我不知道客户 ID。当我获得开发密钥时,clint ID 不需要消息发布。@ Vijaya 有什么问题............谢谢
    • 请注意,您不再需要为 YouTube API 请求提供客户端 ID。
    • 当我得到 Dev key 时显示上面的消息
    猜你喜欢
    • 2012-11-07
    • 2013-11-21
    • 2015-03-03
    • 2010-12-13
    • 2016-09-01
    • 2017-10-04
    • 1970-01-01
    • 2015-09-26
    • 2018-03-14
    相关资源
    最近更新 更多