tasianmedia / getYoutube

A simple video retrieval Snippet for MODX Revolution
http://modx.com/extras/package/getyoutube
4 stars 5 forks source link

Error calling a channel #19

Open crimsonpixel opened 5 years ago

crimsonpixel commented 5 years ago

I've downloaded your extra for MODX 2.7.1 and creates API key for YouTube Data V3 however, nothing displays on the page and I am getting the following error when I try to call a particular channel:

core/components/getyoutube/model/getyoutube/search.class.php : 63) PHP warning: Invalid argument supplied for foreach()

The Channel does exisit and is a public.

[[!getYoutube? &mode=channel &channel=channelid &tpl=videoTpl]]

davidpede commented 5 years ago

I expect this is an api key issue at Google's end. In the Google Developer Console try:

  1. Create new project
  2. Add and enable 'YouTube Data API v3' to the new project
  3. Create new 'API key' credential
  4. Retry getYoutube extra with new api key

Let us know if this works or not

crimsonpixel commented 5 years ago

I did as you suggest and unfortunately still getting same error and no channel being returned.

I am currently developing the site on modxcloud - don't know if that makes a difference?

I have checked the channel ID using https://commentpicker.com/youtube-channel-id.php and that is correct too.

davidpede commented 5 years ago

Shouldn't do. Email your api key and channel id to dev@tasian.media and will take a quick look

davidslds commented 4 years ago

I am having exactly the same problem, did you guys could solve it?

crimsonpixel commented 4 years ago

Yep we did get it resolved. You need to download this beta-2 package here:

https://github.com/davidpede/getYoutube/raw/develop/_packages/getyoutube-1.2.1-beta2.transport.zip

It will log errors from the google API to your MODX error log which should help you debug. I had an issue surrounding the HTTP referrer on my domain and restriction to YouTube Data API v3. Hopefully that will help get to the bottom of it.

Webartdp commented 2 months ago

Hello. Here are the following errors [2024-06-08 07:32:55] (ERROR @ /var/www/ch17d7f3bc/www/aluabri.com.ua/core/components/getyoutube/model/getyoutube/search.class.php : 46) getYoutube() - The request cannot be completed because you have exceeded your quota. [2024-06-08 07:32:55] (ERROR @ /var/www/ch17d7f3bc/www/aluabri.com.ua/core/components/getyoutube/model/getyoutube/search.class.php : 55) getYoutube() - Google API returned an error [2024-06-08 07:32:59] (ERROR @ /var/www/ch17d7f3bc/www/aluabri.com.ua/core/components/getyoutube/model/getyoutube/search.class.php : 46) getYoutube() - The request cannot be completed because you have exceeded your quota. [2024-06-08 07:32:59] (ERROR @ /var/www/ch17d7f3bc/www/aluabri.com.ua/core/components/getyoutube/model/getyoutube/search.class.php : 55) getYoutube() - Google API returned an error [2024-06-08 07:35:12] (ERROR @ /var/www/ch17d7f3bc/www/aluabri.com.ua/core/components/getyoutube/model/getyoutube/search.class.php : 46) getYoutube() - The request cannot be completed because you have exceeded your quota. [2024-06-08 07:35:12] (ERROR @ /var/www/ch17d7f3bc/www/aluabri.com.ua/core/components/getyoutube/model/getyoutube/search.class.php : 55) getYoutube() - Google API returned an error