iframe www.youtube.com/subscribe_embed? google plus

让人想犯罪 __ 提交于 2019-12-23 01:37:15

问题


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&amp;usegapi=1&amp;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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!