Subscribe button from youtube

Asked

Viewed 973 times

2

I’m making a page listing youtube videos and I would like to make a button for the user to subscribe to the channel, but in the examples I found on the internet they come a lot of information beyond what I need, in my case I would just present the button "enroll". Look at the code below:

<iframe src=http://www.youtube.com/subscribe_widget?p=CissaMagazineBR style="overflow: hidden; height: 200px; width: 400px; border: 0;" scrolling="no" frameborder="0"></iframe> 

1 answer

1

The Google Developers has a page to create this button, just access Youtube Subscribe Button.

An example button to subscribe to the Google Developers channel:

<script src="https://apis.google.com/js/platform.js"></script>

<div class="g-ytsubscribe" data-channel="GoogleDevelopers" data-layout="default" data-count="default"></div>

The attribute data-channel="GoogleDevelopers" is the ID or Channel name.

  • Yes I downloaded this site, but the button it presents is written "youtube" instead of "subscribe"

  • @Gabrielschmidtcordeiro you can put the attribute data-layout="full", so it will display the name and image of your channel. But I believe that the Youtube API does not provide option to change the text, otherwise they could create a button with other text "tricking" people to subscribe to channels.

  • I could do that, but at first my goal is http://i.imgur.com/n0Rsnzi.jpg

Browser other questions tagged

You are not signed in. Login or sign up in order to post.