Here are all the test I preformed to make sure it is not the code but the API:
- Checked the code, debugged, re-coded it etc.
- Tested the page on multiple servers
- Tested the page on multiple browsers
- Tested the page on multiple networks
- Tested a similar program using the same API feed
- Tested the same API feed, just for different channel
Here is the page I am trying to display latest upload form my channel:
As you can see it is blank, it doesn't even show the code when you look at the source.
Here is what the code looks like:
<?phperror_reporting(E_ALL);$feedURL = 'http://gdata.youtube.com/feeds/api/users/PixelLaboratories/uploads?max-results=3';$sxml = simplexml_load_file($feedURL);$i=0;foreach ($sxml->entry as $entry) { $media = $entry->children('media', true); $watch = (string)$media->group->player->attributes()->url; $thumbnail = (string)$media->group->thumbnail[0]->attributes()->url; ?>
<div class="oneThird" style="width:30%; height: auto; margin-left:2%; float:left;"> <a target="_parent" href="<?php echo $watch; ?>" class="watchvideo"> <div class="image frameInner"> <img src="<?php echo $thumbnail;?>" alt="<?php echo $media->group->title; ?>" />
<div class="mask youtube"> <p><?php echo $media->group->title; ?></p> </div> </div></a> <span class="shadow"><img src="../images/big-shadow4.png" alt=""></span></div> <?php $i++; if($i==3) { echo '<div class="clear small_v_margin"></div>'; $i=0; } } ?>The purpose of it is to track the 3 latest uploads form my channel.
I hope there is a work-around or fix for this, I really need it since I am launching the website soon and this is used on the home page.
Thanks to anyone willing to help.
Starting October 15, 2012, this group will stop accepting new posts. We recommend that developers start using Stack Overflow and the Issue Tracker for YouTube API support. More details about this change and relevant links can be found at http://apiblog.youtube.com/2012/09/the-youtube-api-on-stack-overflow.html
No comments:
Post a Comment