SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help with Youtube Data API

    Hey, basically what I trying to so is authenticate a user, and get the video feed for a certain video that the user owns. Im using PHP and ClientLogin to authenticate.

    I don't know what I'm doing wrong. If I'm authenticated, I should get a feed that includes a <link> tag that looks like :
    Code:
    <link rel='http://gdata.youtube.com/schemas/2007#insight.views'
      type='text/html'
      href='http://insight.youtube.com/video-analytics/csvreports?query=... >
    But I just get the standard feed with basic link tags for unauthenticated users. I know it's authenticating, because if I get a user feed with user "default" it gets the videos from my username. But when I get a regular video feed, I don't see a <link> tag with insight data.

    Here's my code right now:

    Code:
    session_start();
    require_once 'Zend/Loader.php'; // the Zend dir must be in your include_path
    Zend_Loader::loadClass('Zend_Gdata_YouTube');
    Zend_Loader::loadClass('Zend_Gdata_ClientLogin'); 
    $developerKey = 'AI39si4h2sb783OVgbcLjkk93F0n15qRZvsqQ_TU0Ch3od44wNvz1zQ1ozpnfF9pXjKMrZMpDCnQ03NnHMTEyfdXU1TqYwCu6g';
    $applicationId = 'csvproj';
    $clientId = 'csvproj';
    $authenticationURL= 'https://www.google.com/youtube/accounts/ClientLogin';
    $httpClient = Zend_Gdata_ClientLogin::getHttpClient(
                  $username = 'jayvanbuiten',
                  $password = 'highfive',
                  $service = 'youtube',
                  $client = null,
                  $source = 'csvproj', // a short string identifying your application
                  $loginToken = null,
                  $loginCaptcha = null,
                  $authenticationURL);
    
    
    
    $yt = new Zend_Gdata_YouTube($httpClient, $applicationId, $clientId, $developerKey);
    
    
    $videoEntry = $yt->getVideoEntry('TcCnDbKR9s4');
    
    print_r ($videoEntry);

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey, can anyone help me out with this? I know I'm authenticated, but I cant get anything that shows me the insight data.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •