Genel bakış
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
YouTube Subscribe Button, herhangi bir sayfaya Subscribe
düğmesi eklemenize olanak tanır. Düğme, bir YouTube kanalına bağlanır. Düğme tıklandığında, kullanıcının aboneliği onaylayabilmesi için YouTube kanal sayfası yeni bir pencerede açılır.
Düğme eklemek için uygulamanızın şu JavaScript dosyasını yüklemesi gerekir:
https://apis.google.com/js/platform.js
Ardından, <div>
gibi bir öğe kullanarak düğme ekleyebilirsiniz. Bu öğe, class
özelliğini g-ytsubscribe
olarak ayarlar ve düğmeyi özelleştirmek için diğer özellikleri kullanır. Aşağıdaki kodda, GoogleDevelopers kanalı için Subscribe
düğmesi gösteren basit bir entegrasyon yer almaktadır.
<script src="https://apis.google.com/js/platform.js"></script>
<div class="g-ytsubscribe" data-channel="GoogleDevelopers"></div>
Bir düğmeyi dinamik olarak oluşturmak için Google+ JavaScript API'sı da kullanabilirsiniz.
Yapılandırma seçenekleri
Aşağıdaki düğmeler, abonelik düğmeleri için farklı düzen ve yapılandırma seçeneklerini göstermektedir. Standart kanallara yönelik düğmeler, abone sayılarıyla veya abone sayıları olmadan gösterilir.
Düğme dili varsayılan olarak kullanıcının dil ayarlarına veya oturumu kapalı olan kullanıcılar için kullanıcının konumuna göre ayarlanır.
Standart kanallar
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-08-21 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-08-21 UTC."],[],[],null,["# Overview\n\nThe YouTube Subscribe Button lets you add a `Subscribe` button to any page. The button links to a YouTube channel. Upon clicking the button, the YouTube channel page opens in a new window so that the user can confirm the subscription.\n\nTo add a button, your application needs to load this JavaScript file: \n\n```\nhttps://apis.google.com/js/platform.js\n```\n\nYou can then add a button by using an element, such as a `\u003cdiv\u003e`, that sets its `class` to `g-ytsubscribe` and uses other attributes to customize the button. The following code shows a simple integration that displays a `Subscribe` button for the GoogleDevelopers channel. \n\n```\n\u003cscript src=\"https://apis.google.com/js/platform.js\"\u003e\u003c/script\u003e\n\u003cdiv class=\"g-ytsubscribe\" data-channel=\"GoogleDevelopers\"\u003e\u003c/div\u003e\n```\n\nYou can also use the [Google+ JavaScript API](/+/web/api/javascript) to render a button dynamically.\n\nConfiguration options\n---------------------\n\nThe buttons below show different layout and configuration options for subscription buttons. Buttons for standard channels are shown with and without subscriber counts.\n\nThe button language defaults to the user's language settings or is set based on the user's location for logged-out users.\n\n### Standard channels\n\n| Buttons ||\n|-------------------------------|---|\n| Default button | |\n| Default button | |\n| Full layout (includes avatar) | |\n| Full layout (includes avatar) | |\n| Full layout, dark theme | |\n| Full layout, dark theme | |"]]