YouTube API setting playlist position
I'm using Version 2 of the YouTube API in PHP and have been so for over a year. Everything worked fine till around 2 weeks ago. I then noticed problems with the playlists, particularly adding video entries to playlists and setting the position.
 My request headers and payload are correct, according to the API Documentation.  I also receive a 200 Response Code and in the response body my playlist entry has a yt:position of 1. But checking the playlist the position is actually at the end, not the beginning.  
I would like to know if anyone is having similar problems and if they perhaps have found a solution?
Below is a sample of my request / response:
Response:
 HTTP/1.1 200 OK  
 X-GData-User-Country: DE  
 Content-Type: application/atom+xml;  charset=UTF-8;  type=entry  
 GData-Version: 2.1  
 ETag:  
 Transfer-Encoding: chunked  
 Date: Thu, 13 Dec 2012 17:17:20 GMT  
 Expires: Thu, 13 Dec 2012 17:17:20 GMT  
 Cache-Control: private, max-age=0  
 X-Content-Type-Options: nosniff  
 X-Frame-Options: SAMEORIGIN  
 X-XSS-Protection: 1;  mode=block  
 Server: GSE Connection: close  
 <entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007' gd:etag=''>  
 ...  
 <yt:position> 1 </yt:position>  
 </entry>  
Request:
 PUT /feeds/api/playlists/PLAYLIST/PLAYLIST_ENTRY HTTP/1.1  
 Accept: /  
 Host: gdata.youtube.com  
 Connection: close  
 X-GData-Key: key=DEVELOPER_KEY  
 User-Agent: Zend_Framework_Gdata/1.11.8  
 authorization: GoogleLogin auth=AUTH_KEY  
 GData-Version: 2  
 Accept-encoding: identity  
 Content-Type: application/atom+xml  
 Content-Length: 166  
<?xml version="1.0" encoding="UTF-8"?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:yt="http://gdata.youtube.com/schemas/2007"><yt:position>1</yt:position></entry>
链接地址: http://www.djcxy.com/p/48872.html上一篇: PHP Curl发送错误的内容
下一篇: YouTube API设置播放列表位置
