I have a MM config setup to upload a cck video field to youtube, and I am getting an error saying:
Cannot authenticate. Error: Authentication with Google failed. Reason: NoLinkedYouTubeAccount
I am using my "username" to sign into youtube which is my linked gmail account blah@somedomain.us (its a domain managed by gmail, youtube allows it to be the username). However it is not authenticating... The nickname that the email is linked to on youtube is not the username/password (so http://www.youtube.com/user/someusernickname isnt the real username used to sign in, the email is the correct username... but anyway either 'username' doesnt work). Should I just setup a regular non-google account linked user and try again or is there a way to get a google account to work with this module/youtube api?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

armyofda12mnkeys’s picture

Still haven't been able to upload Youtube Videos...
Thought I'd post my drupal/youtube configuration with some attached pics...

The configuration has a content type called 'Video Upload'. It has a cck field for the video file upload(s) and a cck field for emfield (3rd party youtube link)... after the Youtube upload completes, i wanted it to populate the same node's Embedded Video field with the link.

My pics of my Youtube api and Youtube username are attached. I show how I can't sign in onto Youtube.com with my Youtube account smoministries and can only sign in with my linked smoministries Google account that the email is attached to (not sure if this is important but that is a Gmail managed email for that domain)... but using that username/password in my Drupal Youtube MediaMover settings doesnt work and gets the NoLinkedYouTubeAccount error. Also attached are pics of my configurations for Media Mover and the content type.

kobnim’s picture

The problem *might* be with your username.

My youtube username and password are different from my gmail username and password.

Have you tried logging directly into your youtube account, and manually uploading a test video?

- Mindy

armyofda12mnkeys’s picture

I think it may have to do with this...
If your account email is a hosted Google Apps Domain email (smoministries.us is managed by Google Apps, if you are not familiar with that... it means users can login to see their email via gmail link basically, Dreamhost offers this on domains )... and if the email is also used to setup a Google Account.

It is outlined here and solution:
http://groups.google.com/group/youtube-api-gdata/browse_thread/thread/10...

I think it involves changing how the request is sent by the php youtube api, but not sure where in the module to set that 'accountType' parameter they are talking about in that link

armyofda12mnkeys’s picture

Sweet, figured it out:

In media_youtube.media_mover.inc and media_youtube.api.inc, explicitly set GOOGLE as video provider if you are using GoogleApps to manage your domain/email and those emails are linked to Youtube accounts:

So Respectively in each file, add ", 'GOOGLE'" to the request:
$httpclient = Zend_Gdata_ClientLogin::getHttpClient($username, $password, 'youtube', NULL, MEDIA_YOUTUBE_APP_ID, NULL, NULL, MEDIA_YOUTUBE_AUTH_URL, 'GOOGLE');

and:

$httpClient = Zend_Gdata_ClientLogin::getHttpClient($youtube_username, $youtube_password, 'youtube', NULL, MEDIA_YOUTUBE_APP_ID, NULL, NULL, MEDIA_YOUTUBE_AUTH_URL, 'GOOGLE');

armyofda12mnkeys’s picture

Also if having problems with ampersands in your Category like 'Nonprofits & Activism', you have to use the shortcut as I found in the schema: http://gdata.youtube.com/schemas/2007/categories.cat

like it is just 'Nonprofit' for mine.

Thanks!,
Ari

armyofda12mnkeys’s picture

Status: Active » Fixed

So i got it to upload to youtube, but it doesn't fill in a cck field with the new node thats created based on the upload... Had some funky issues too with a new node being created multiple times (without cck filled as stated above) every time cron ran... So I'd have a converted file file1.flv, and then file1_0.flv, file1_1.flv, etc and a node created for each of those files (should only have 1 new node created). Will close this and open new support ticket with my new configuration after I confirm.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.