.net - .net youtube库集成

标签 .net api youtube

我在将youtube api集成到我的web应用程序时遇到了一些问题,我确实使用了Analytics spi和这项工作,但是当我尝试添加youtube服务时出现此错误:

Il tipo 'Google.Apis.Services.BaseClientService' è definito in un assembly di cui manca il riferimento. Aggiungere un riferimento all'assembly 'Google.Apis, Version=1.10.0.25332, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab'.

这里的代码
    using Google.Apis;
using Google.Apis.Auth;


using Google.Apis.Services;
using Google.Apis.Analytics.v3;
using Google.Apis.Analytics.v3.Data;

using Google.Apis.YouTube.v3;
using Google.Apis.YouTube.v3.Data;

public class DashBoard 
    {


    protected ServiceAccountCredential credential = null;
    protected AnalyticsService analytics_service = null;
    protected YouTubeService youTube_service = null; 

.....

产生错误的行是:protected YouTubeService ....删除所有工作,添加此错误

我该怎么检查才能发现错误?

最佳答案

您需要检查三点

  • 引用的Google.Apis.Services.BaseClientService版本,可能是您尝试使用的引用版本与youtube数据API
  • 所需的引用版本不同
  • 在Google开发者控制台中,启用youtube数据api的状态
  • 通过nuget包管理器
  • 更新Google Api客户端库

    关于.net - .net youtube库集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34414294/

    相关文章:

    c# - 使用 C# 仅列出文件和 FTP 服务器的上次修改日期

    .net - 调查从服务器通知 WPF 客户端的解决方案

    c - OpenGL 2.1 绘制具有不同缓冲区索引的对象

    api - 命名空间 "App"没有注册路径。 FosRestBundle,Symfony

    ruby - 如何在 ruby​​ 中指定 youtube api 的时间

    api - YouTube的API playlistItems.list缺少视频

    c# - 如何在 aspx 中运行 if 语句?

    c# - Azure 移动应用身份验证

    python - 如何在 Python 中 append 分页响应的数据集?

    ruby-on-rails - 在 rails 中嵌入 youtube 视频