1

I want to embed a youtube subscribe button in my webpage. But each time the subscribe button is clicked, it redirects the user to the YouTube app to subscribe. I want the user to stay in my website, but let the user get a pop up window or something like that, to give access.

PS: this isn't a code request question. Just if someone points me in the right direction. I will figure it out. But if someone is willing to share any code, thanks for the help.

0

I want the user to stay in my website, but let the user get a pop up window or something like that, to give access.

The best approach (arguably) to exercise maximum control (and avoid 3rd-party payload etc.) is to use your own link to Youtube, which can be your own <button> or even just a styled <a> link.

Then, if you wish to open a link target in a new browser tab, simply use target="_blank".

e.g.

<a href="https://youtube.com/subscribe-url" title="Subscribe to Youtube" target="_blank">Subscribe to Youtube</a>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.