GData를 사용하여 재생 목록에 동영상을 추가하고 싶습니다. 따라서 재생 목록을 만드는 데 아무런 문제가 없지만 동영상을 추가 할 수는 없습니다.YouTube API getPlaylistVideoFeedUrl 문제
$playlist = $yt->newPlaylistListEntry();
$playlist->summary = $yt->newDescription()->setText("test");
$playlist->title = $yt->newTitle()->setText("test2");
$postLocation = 'http://gdata.youtube.com/feeds/api/users/default/playlists';
$yt->insertEntry($playlist, $postLocation);
$feedUrl = $playlist->getPlaylistVideoFeedUrl();
$videoEntryToAdd = $yt->getVideoEntry(..given id here..);
$newPlaylistListEntry = $yt->newPlaylistListEntry($videoEntryToAdd->getDOM());
$yt->insertEntry($newPlaylistListEntry, $feedUrl);
그리고 나는 다음과 같은 오류 얻을 : 여기에 내가 무엇을이 코드로 인해 발생
Notice: Trying to get property of non-object in C:...\library\Zend\Gdata\YouTube\PlaylistListEntry.php on line 296
:
$feedUrl = $playlist->getPlaylistVideoFeedUrl();
var_dump
가 $feed_url
이 NULL 것을 보여줍니다 . 그리고 그것은 $playlist
이 객체 Zend_Gdata_YouTube_PlaylistListEntry
이라는 것을 보여줍니다. 그래서 "non-object의 속성"을 쓰는 이유를 이해할 수 없습니다.