donglu8779 2013-10-29 10:56
浏览 46
已采纳

Youtube Analytics PHP cron

I want to start developing a tool that runs daily via cron for getting daily analytical data from one channel, or video, etc.. through the "Youtube Analytics API". And not what is the best way to approach it.

I have read the documentation of Google and and I have several questions:

    • I created the project in the console (https://code.google.com/apis/console/) but I doubt what kind of application I have to choose when I create a Client ID (Web Application, Service Account or Installed aplplication).
    • What PHP library use? It's a very new API and not much information. In the Google GData site there is a warning about that "Most newer Google APIs Google Data APIs are not Google Data APIs." and in the google-api-php-client, no examples of this API.
    • What is the best method for authentication in a cron?

As you can see I am very confuse, can someone help me, please?

Thank you.

  • 写回答

1条回答 默认 最新

  • dsj60862 2013-10-31 19:46
    关注

    1) It will be an installed application unless you will run it in a web server.

    2) Use the official library, add the ytanalytics php library. Samples: https://github.com/youtube/yt-samples-php

    3) You can do so by getting a refresh token from OAuth2 Playground and setting it in your youtube object.

    Here it explains a little more.

    And a step by step video.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度