Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error calling a channel #19

Open
crimsonpixel opened this issue Jul 31, 2019 · 6 comments
Open

Error calling a channel #19

crimsonpixel opened this issue Jul 31, 2019 · 6 comments

Comments

@crimsonpixel
Copy link

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
Copy link
Member

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
Copy link
Author

crimsonpixel commented Aug 1, 2019

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
Copy link
Member

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

@davidslds
Copy link

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

@crimsonpixel
Copy link
Author

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
Copy link

Webartdp commented Jun 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants