Hello Marc,
Sorry about that. This is particularly confusing because some of the
client libraries (like the Java one) have logic in them that
explicitly subtract 1 from the indices used natively by the API, and
reverse that when sending updates. So in Java you'd want to pass in 0
for the first position, and in PHP you apparently pass in 1.
I'll get the docs updated.
Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev
On May 1, 12:21 pm, Marc R <braincast...@gmail.com> wrote:
> Hi all,
>
> According to the sample code given here:https://developers.google.com/youtube/2.0/developers_guide_php?hl=en#...
>
> You can update an playListVideoEntry's position by doing:
>
> $playlistVideoEntryToBeModified->setPosition($yt->newPosition(0));
>
> Seems simple enough but I had a hard time getting a playListVideoEntry
> object at first and then it gave me an error "Internal Error", nothing
> more...
> Only after fiddling around with my code for some time we finally found that
> position 0 isn't working, position 1 is what you want.
>
> $playlistVideoEntryToBeModified->setPosition($yt->newPosition(1));
>
> I hope this will safe someone some time ;)
--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.
No comments:
Post a Comment