问题
I saw this thread Embed Youtube subscribe counter? and I am wondering where does this button come from ?
I asked it on that thread but I don't think anyone noticed that
I tried some code for myself but this gives a js error Uncaught Error: Bad hint
<iframe data-gapiattached="true" frameborder="0" scrolling="no"
src="http://www.youtube.com/subscribe_embed?bsv&usegapi=1&channel=HERE CHANNELNAME"
style="overflow: hidden; height: 24px; width: 170px; border: 0;">
</iframe>
It looks like a plusone.js button but nothing to find.
Hope someone can shine some light on this youtube channel subscribe button :-)
only change this - channel=HERE CHANNELNAME
UPDATE:
Above is not the right embed code. It is a part of the plusone.js code from google The right embed code is:
<div class="g-ytsubscribe" data-channel="CHANNELNAME"></div>
<script src="https://apis.google.com/js/plusone.js"></script>
This works but still no documentation found so if anyone knows where to find the official code please let me know
来源:https://stackoverflow.com/questions/17698628/iframe-www-youtube-com-subscribe-embed-google-plus