Welcome Guest, Not a member yet? Register   Sign In
YouTube API Request : Token problem with Jim S.' code
#1

[eluser]DocFunky![/eluser]
Hello there !

I'm trying to implement the YouTube API on my website.
I followed the Jim Saunders instructions here :http://code.google.com/intl/fr/apis/youtube/articles/codeigniter_library.html

and here : http://codeigniter.com/wiki/OAuth_for_Google/
(approximately the same)

SO first of all, I needed to get the token secret with a request_youtube function, that function works correctly, i've entered my consumer key and consumer secret from google and everything is just fine. So then I'm redirected to YouTube to authorize the YouTube access, but when I'm redirected to my site, I got 2 problems :

The Url I got is : http://s390075769.onlinehome.fr/index.ph...cZasQP-e0s

and codeIgniter doesn't understant the "/" and doesn't redirect me to the example/access_youtube function, If I correct it manually, then I go to my access_youtube function with my parameters but here is second (fatal) problem I got :

First, here are my two variables I got from the url :
oauth_verifier=6wbPcxlOA************
&
oauth_token=1/6Nfchy_nM-j4vxQzhAWTuc1J20L02b***********

yet, on the google Oauth Playground (that you'll be able to find here : http://googlecodesamples.com/oauth_playground/) I'm supposed to get something like that : oauth_token=1/P9o-yO1Czz1q67pvPm**********************iMI&oauth_token_secret=CzeSat342hO5HzswJEq94ZPH&oauth_callback_confirmed=true

so that mean I didn't get the same variables ... why ? how could I get thoses variables instead of the one I got ? Are they the same ?

Second,
I got several errors in my access_Youtube function, CI tell :
-Message: Undefined index: oauth_token
-Message: Undefined index: oauth_token_secret

so it doesn't get informations from the header ... I don't really know how to do so, I've followed the Jim' Instructions but I'm a kind of stuck there, does anyone who tried to implement an OAuth access on his site has an idea ?

Thank You Smile




Theme © iAndrew 2016 - Forum software by © MyBB