Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Kupası
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPress’te Facebook Beğen Düğmesi Nasıl Eklenir

Editoryal Not: WPBeginner üzerindeki ortak bağlantılardan komisyon kazanıyoruz. Komisyonlar, editörlerimizin görüşlerini veya değerlendirmelerini etkilemez. Editoryal Süreç hakkında daha fazla bilgi edinin.

WordPress’e bir Facebook Beğen düğmesi eklemek ister misiniz?

WordPress web sitenizdeki bir Facebook Beğen düğmesi, kullanıcıların içeriğinizi beğenmesini ve paylaşmasını basit ve kolay hale getirebilir. Bu, etkileşimi artırmanıza ve daha fazla takipçi kazanmanıza yardımcı olabilir.

Bu makalede, WordPress’te Facebook Beğen düğmesinin nasıl ekleneceğini göstereceğiz.

How to add Facebook like button in WordPress

WordPress’e Neden Facebook Beğen Düğmesi Ekleyelim?

Facebook, dünyanın en popüler sosyal medya platformlarından biridir. Birçok işletme Facebook’u müşterileriyle bağlantı kurmak ve ürünlerini tanıtmak için kullanıyor.

WordPress web sitenize bir Facebook Beğen düğmesi eklemek daha fazla etkileşim sağlamanıza yardımcı olabilir. Ayrıca insanları içeriğinizi Facebook profillerinde paylaşmaya ve sitenize yeni kullanıcılar çekmeye teşvik eder.

Sosyal takipçilerinizi artırmak ve bir topluluk oluşturmak için Facebook Beğen düğmesini kullanabilirsiniz. Ürünleriniz ve hizmetleriniz hakkında farkındalık yaratmaya yardımcı olur ve dönüşümleri artırır.

Bunu akılda tutarak, WordPress web sitenize nasıl Facebook Beğen düğmesi ekleyeceğinizi göstereceğiz. İşte bu kılavuzda ele alacağımız yöntemlere hızlı bir genel bakış:

Hazır mısınız? Bir eklenti veya özel kod kullanarak WordPress’e Facebook Beğen düğmesinin nasıl ekleneceğini görelim.

Yöntem 1: Bir Eklenti Kullanarak WordPress’e Facebook Beğen Düğmesi Ekleme

Bu yöntemde, Facebook Beğen butonu eklemek için bir WordPress eklentisi kullanacağız. Bu yöntem çok kolaydır ve yeni başlayanlar için önerilir.

Yapmanız gereken ilk şey BestWebSoft’un Beğen & Paylaş eklentisini yüklemek ve etkinleştirmektir. Daha fazla ayrıntı için, bir WordPress eklentisinin nasıl kurulacağına ilişkin adım adım kılavuzumuza bakın.

Etkinleştirmenin ardından WordPress yönetici panelinizden Beğen & Paylaş ” Ayarlar bölümüne gidebilirsiniz.

Like and share plugin settings

Ardından, bir Facebook ‘Uygulama Kimliği’ ve ‘Uygulama Sırrı’ eklemeniz gerekecektir. Bu bilgilere sahip değilseniz, aşağıdaki adımları izlemeniz yeterlidir.

Facebook Uygulama Kimliği ve Uygulama Sırrı Nasıl Oluşturulur

‘Ayarlar’ panelinde, devam edin ve Beğen & Paylaş eklentisindeki ‘Uygulama Kimliği’ veya ‘Uygulama Sırrı’ alanının altındaki ‘Yeni bir tane oluştur’ bağlantısına tıklayın.

Bu sizi Meta for Developers web sitesine götürecektir. Web sitesini yeni bir sekmede veya pencerede açmanızı öneririz çünkü uygulama kimliğini ve sırrını girmek için WordPress kontrol panelinizdeki Beğen ve Paylaş ayarları sayfasını açmanız gerekecektir.

Buradan, bir uygulama türü seçmeniz gerekecek. Devam edin ve uygulama türü olarak ‘İşletme’yi seçin ve ‘İleri’ düğmesine tıklayın.

Choose your app type

Ardından, uygulamanız hakkında temel bilgileri sağlamanız gerekir.

Uygulamanız için bir görünen ad girebilir ve ‘Uygulama iletişim e-postası’ alanında doğru e-posta adresinin göründüğünden emin olabilirsiniz. Facebook otomatik olarak o anda giriş yaptığınız hesabın e-posta adresini seçecektir.

Ayrıca bir işletme hesabı seçme seçeneği de vardır. Bunu ‘Seçili İşletme Yöneticisi hesabı yok’ seçeneğinde bırakabilir ve ‘Uygulama oluştur’ düğmesine tıklayabilirsiniz.

Enter basic information for app

Ardından, bir açılır pencere görünecektir. Burada, Facebook sizden şifrenizi yeniden girmenizi isteyecektir.

Bu, hesabınızdaki kötü niyetli faaliyetleri önlemek için bir güvenlik önlemidir. Devam edin ve Facebook hesap şifrenizi girin ve ‘Gönder’ düğmesine tıklayın.

Reenter your Facebook password

Bundan sonra, uygulama kontrol panelinizi göreceksiniz.

Buradan, sol tarafınızdaki menüden Ayarlar ” Temel seçeneğine gidebilirsiniz.

Go to basic settings page

Şimdi, ‘Ayarlar’ açılır menüsünü genişletmek ve ‘Temel’ seçeneğine tıklamak isteyeceksiniz. Burada, ‘Uygulama Kimliği’ ve ‘Uygulama Sırrı’nı göreceksiniz.

Artık bu bilgileri Beğen & Paylaş eklentisi ayarlarına girebilirsiniz.

Copy the app ID and secret

Facebook Beğen Düğmenizi Özelleştirmeyi Bitirin

İlk olarak, ‘Uygulama Kimliği’ni kopyalamak ve Beğen & Paylaş ” Ayarlar sayfasının açık olduğu sekmeye veya pencereye geri dönmek isteyeceksiniz. Ardından, ‘Uygulama Kimliği’ni ilgili alana girmeniz yeterlidir.

Şimdi, Geliştiriciler için Meta sayfasındaki ‘Uygulama Sırrı’ verilerini kopyalayıp Beğen ve Paylaş eklentisi ayarlarına yapıştırarak adımı tekrarlamak isteyeceksiniz.

Customize your Facebook like button

Bunu yaptıktan sonra, Facebook Beğen düğmesinin Profil URL’si ve Paylaş düğmeleriyle birlikte gösterilip gösterilmeyeceğini seçebilirsiniz.

Facebook Beğen düğmesinin boyutunu, içerikten önceki veya sonraki konumunu ve hizalamasını düzenlemek için ayarlar da vardır.

More customization options

Profil URL düğmesini etkinleştirdiyseniz, ‘Profil URL Düğmesi’ bölümüne ilerleyebilir ve Facebook kullanıcı adınızı veya kimliğinizi girebilirsiniz.

İşiniz bittiğinde, değişikliklerinizi kaydetmeyi unutmayın.

Şimdi, eklenti WordPress web sitenize otomatik olarak bir Facebook Beğen düğmesi ekleyecek ve ayarlarınıza göre konumlandıracaktır.

Facebook Beğen düğmesini sitenizin herhangi bir yerine eklemek için [fb_button] kısa kodunu da kullanabilirsiniz.

Hepsi bu kadar! Artık sitenizi ziyaret edebilir ve her gönderide Beğen düğmesini görebilirsiniz.

Facebook like button preview

Yöntem 2: WordPress’te Facebook Beğen Düğmesini Manuel Olarak Ekleme

Facebook Beğen düğmesi eklemenin bir başka yolu da özel kod kullanmaktır. Ancak, bu yöntem doğrudan WordPress’e kod eklemeyi gerektirir, bu nedenle yalnızca kod düzenleme konusunda rahat olanlar için öneriyoruz.

Bu bölümde, herkesin WordPress bloguna kod eklemesini kolaylaştırdığı için WPCode eklentisini kullanacağız.

Ama önce, Meta for Developers web sitesindeki ‘Like Button’ sayfasını ziyaret etmeniz ve ‘Like Button Configurator’ bölümüne gitmeniz gerekiyor.

Get code from Facebook developer site

Ardından, Facebook sayfanızın URL’sini ‘Beğenilecek URL’ alanına girin. Bu, Facebook Beğen düğmesini sayfanıza bağlayacaktır.

Bundan sonra, Beğen düğmesi düzenini ve boyutunu seçmek için yapılandırmayı kullanmanız yeterlidir. Ayrıca Beğen düğmesinin bir önizlemesini de alacaksınız.

Önizlemeden memnun kaldığınızda, devam edin ve ‘Kodu Al’ düğmesine tıklayın. Bu, ‘JavaScript SDK’ sekmesi altında iki kod parçacığı gösteren bir açılır pencere getirecektir.

Copy the SDK code

Bu kod parçacıklarını WordPress temanıza doğrudan eklemenin web sitenizi bozabileceğini lütfen unutmayın. Ayrıca, temayı güncellediğinizde bunların üzerine yazılacaktır.

Bu yüzden WPCode eklentisini kullanmanızı öneririz. Bu eklenti, kod parçacıklarını web sitenize yapıştırmanıza ve tema dosyalarını doğrudan düzenlemeden özel kodu kolayca yönetmenize olanak tanır.

Başlamak için WPCode ücretsiz eklentisini yüklemeniz ve etkinleştirmeniz gerekir. Daha fazla ayrıntı için lütfen WordPress eklentisi yükleme kılavuzumuza bakın.

Etkinleştirmenin ardından, WordPress panonuzdan Kod Parçacıkları ” Üstbilgi ve Altbilgi bölümüne gidebilirsiniz.

Ardından, ilk kod parçacığını kopyalamanız ve WordPress temanızın header.php dosyasına <body> etiketinden hemen sonra eklemeniz gerekir. Basitçe kodu kopyalayın ve ‘Gövde’ bölümüne girin.

Bu işlemi tamamladıktan sonra ‘Değişiklikleri Kaydet’ düğmesine tıklamayı unutmayın.

Add first code to header section

Ardından, ikinci kod parçasını kopyalamanız ve Facebook Beğen düğmesini görüntülemek için WordPress sitenize yapıştırmanız gerekir.

Bunu yapmak için WordPress yönetici panelinizden Code Snippets ” + Add Snippet bölümüne gidebilirsiniz. Ya da WPCode panosundaki ‘Yeni Ekle’ düğmesine tıklamanız yeterlidir.

Click 'Add New Snippet' in WPCode

Bir sonraki ekranda, WPCode önceden oluşturulmuş kütüphaneden bir kod parçacığı seçmenize veya yeni bir özel kod eklemenize izin verecektir.

Devam edin ve ‘Özel Kodunuzu Ekleyin (Yeni Snippet)’ seçeneğini seçin ve ‘Snippet kullan’ düğmesine tıklayın.

Add custom code in WPCode

Bundan sonra, özel kodunuza bir ad verebilir ve ‘Kod Önizleme’ bölümünün altına ikinci kod parçacığını girebilirsiniz.

‘Kod Türü’ açılır menüsüne tıkladığınızdan ve kod türü olarak ‘HTML Snippet’i seçtiğinizden emin olun.

Enter second code and select code type

Ardından, ‘Ekleme’ bölümüne ilerleyebilir ve Facebook Beğen düğmesinin nerede görünmesini istediğinizi seçebilirsiniz. Örneğin, içerikten önce görünmesini istediğinizi varsayalım.

Sadece ‘Konum’ açılır menüsüne tıklayın ve ‘Sayfa, Yazı, Özel Yazı Türleri’ altındaki İçerikten Önce Ekle seçeneğini seçin.

Select location of like button

İşiniz bittiğinde, ‘Snippet’i Kaydet’ düğmesine tıklayabilirsiniz.

Ayrıca geçişe tıklamanız ve ‘Etkin Değil’den ‘Etkin’e geçirmeniz gerekecektir.

Save and activate code snippet WPCode

İşte bu kadar. Kodu girdikten sonra web sitenizde bir Facebook Beğen düğmesi görünecektir.

Open Graph Metadata Nedir ve WordPress’e Nasıl Eklenir?

Open Graph, Facebook’un WordPress sitenizdeki bir sayfa veya gönderi hakkında bilgi toplamasına yardımcı olan meta verilerdir. Bu veriler küçük resim, yazı/sayfa başlığı, açıklama ve yazarı içerir.

Facebook, başlık ve açıklama alanlarını yukarı çekme konusunda oldukça akıllıdır. Ancak, gönderinizde birden fazla görsel varsa, paylaşıldığında bazen yanlış bir küçük resim gösterebilir.

All in One SEO (AIOSEO) eklentisini zaten kullanıyorsanız, All in One SEO ” Sosyal Ağlar ‘ı ziyaret edip Facebook sekmesine tıklayarak bu sorunu kolayca çözebilirsiniz.

Ardından, makalenizin bir açık grafik görseli yoksa ‘Varsayılan Facebook Gönderi Görseli’ ayarlamak için ‘Görsel Yükle veya Seç’ düğmesine tıklayın.

Upload default Facebook image

Bunun yanı sıra, her bir gönderi veya sayfa için bir açık grafik görseli de yapılandırabilirsiniz.

Bir gönderiyi düzenlerken, içerik düzenleyicideki AIOSEO Ayarları bölümüne gitmeniz yeterlidir. Ardından, ‘Sosyal’ sekmesine geçebilir ve küçük resminizin önizlemesini görebilirsiniz.

AIOSEO product social sharing settings

Şimdi, ‘Görsel Kaynağı’ seçeneğine ilerlemek isteyeceksiniz. Ardından, devam edin ve gönderiniz için bir açık grafik görseli seçin.

Örneğin, açık grafik küçük resmi olarak kullanılmak üzere ‘Ekli Resim’, ‘İçerikteki İlk Resim’ veya ‘Özel Resim’i seçebilirsiniz.

Image source for open graph

Daha fazla ayrıntı ve açık grafik meta verilerini eklemenin alternatif yolları için WordPress’te Facebook Açık Grafik meta verilerinin nasıl ekleneceğine ilişkin kılavuzumuza göz atabilirsiniz.

Umarız bu makale WordPress’te Facebook Beğen butonunun nasıl ekleneceğini öğrenmenize yardımcı olmuştur. Daha sonra, WordPress’te Facebook sayfa yorumlarının nasıl görüntüleneceğine ilişkin kılavuzumuzu veya WordPress için en iyi sosyal medya eklentileri uzman seçimlerimizi de görmek isteyebilirsiniz.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Açıklama: İçeriğimiz okuyucu desteklidir. Bu, bazı bağlantılarımıza tıklarsanız komisyon kazanabileceğimiz anlamına gelir. WPBeginner'ın nasıl finanse edildiğini, neden önemli olduğunu ve nasıl destek olabileceğinizi görün. İşte editoryal sürecimiz.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Ultimate WordPress Araç Kiti

Araç setimize ÜCRETSİZ erişim sağlayın - her profesyonelin sahip olması gereken WordPress ile ilgili ürün ve kaynaklardan oluşan bir koleksiyon!

Reader Interactions

177 yorumBir Cevap Bırakın

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. wpbeginner says

    @artist74 There is no EXACT point because it varies. The exact point is determined by where you want the code to show (for example before post / after the post / within the post etc). Once you decide that then you can also do further styling via CSS!

  3. Ovidiu says

    any words of advice about the XFBML version? I copied the code straight from the facebook developer page, need to know if there is anything to do?

  4. Redefining says

    I have a wordpress.com. I have no idea where to start with adding the Facebook Like button. I have been trying to find the single.pnp option. I just need a start on where to find it as I tried the Appearance and then go to theme and then what?Please can you advise?

  5. Aaron Grey says

    I’m torn between adding the facebook like button at the top of my posts or near the bottom, so I added it in both places. Does anyone know if this can cause issues to have 2 like buttons on one post?

  6. Dimitris says

    Hi, I placed the code in the single.php file and inside the loop as you have instructed. When I Like the post everything works correctly except from the title of the post on FB’s wall.

    For example on MyWebiste.com I like the post with a title MyPost.

    On FB wall shows that someone “likes MyWebiste on MyWebiste.com”, not “MyPost on MyWebiste.com”

    However, the link of “MyWebsite” links correctly to the respective article, “MyPost”.

    For me that means that the code works just fine and retrieves the right article, but not the title of the article and I’m trying to figure out if I need to do something else in order to show the title of the posts on FB wall and not only their right links.

    Any suggestions would be appreciated.
    Thank you.

    • Editorial Staff says

      That’s weird because it should take your page title. But to override an fix this issue, look at the resource link that we have in this article. You will need to add og:title meta tag.

      Yönetici

  7. Alvin says

    Hello..
    I’m a site owner and I want to know who’s clicked the like button on each post. Not just the number of people. Is that possible?

  8. Aaron Torng says

    Thanks for the guide! I successfully added the ‘like’ button to my individual pages but I’m still having problems adding it to my main site which aggregates all the posts. Do you know which page I’m supposed to add it to and where?

    Thanks again,
    Aaron

  9. Sipovics says

    Hy!

    My problem is that if I “Like” a post on my site (which is named kukkold.hu) the facebook shows on my profile page that I like the kukkold.hu link on the site kukkold.hu. I experience this at every post, so I always like the main page of my site instead of the link and name of the post. What can be the problem? I tried varius like plugins, and I have inserted the code directly into the loop, but the problem is always the same and it’s really annoying. For a test I wrote a specific permalink into the space of the ID)); ?> block, but the problem was the same again.
    The like counter goes well, so it knows which post how many times was liked.
    What should I do? Please help me!

    Thank you!

  10. charle says

    im using wordpress.com and i trying to add the facebook like box in my blog but i doesn’t work. i read some forum that saying wordpress.com cant read iframe code. is that true? any solution?

  11. Joe says

    I added the code in the loop as you sayed…but nothing happens!! I tried more and more times, in different parts of the loop…. it just doesn’t work!! Any suggestion? Thanks

  12. drowan says

    This is great, however I am encountering a glitch. The code functions fine and everything, but when I like it, instead of ‘liking’ the specific post, it instead ‘likes’ the parent home page. The same shows up on the Facebook feed, just the home page. Have you encountered this problem, and what can I do to fix?

    Thanks!

  13. wilson keenan says

    Thanks so much for this.

    I was wondering – are you using this iframe (in the single.php) w/ meta tags in header.php?

    I’m wondering if the URL in the facebook meta tags is conflicting with my ability to use the edited like button you have here?

    Thanks so much,

    Wil

  14. Aurora says

    Thanks for this great resource! I had played around with some plugins but they just weren’t working well for me, then I found your tutorial and just edited the code and VOILA! Success!

    Thanks!

  15. sanjaperic says

    Hi!

    Thanks for this code, but something not working well…
    For example, if I go on post, I see “Like button and Be the first…message” Ok. Fine! No one like ’till now, doesn’t matter, I will be the first.. so click, Like! And then! Wow! I see that 178 people acctualy like this, but I couldn’t see that untill I like it first. Do you understand? My english is not so good, but hope you can understand what I am talking about…

    If you find a time to go on my page, and then on any single post, you will see Like button and message Be the first… but if you like it, than you’ll find out, that you weren’t the first! :)

  16. Huw Rowlands says

    Hi,

    I have the like button appearing, but when clicking nothing at all happens??

    Please can you advise on this…
    I even installed the Facebook ‘Like’ plugin and had exact same issue.

    Thanks

      • Eli says

        Ok! Forget it! Since IE jumps every time I paste something, I must have doubled “the-content” part somehow.

        Replaced the old single.php, pasted again your code (both before and after “the-content” and works great either way!

        A million thanks for the code!

  17. agon says

    thank you very much, i am starting to learn wordpress…and here i found your site very helpfull for begginers…keep it up…

  18. Lindsay says

    Is there a way to show on the sidebar which posts have the most likes on Facebook. I think it would be neat to see which ones are shared most often.

  19. Mark says

    I addedd the button to my code and it appears in my blog posts. however when I poke it, my facebook profile does not reflect that I like it? Am I doing something wrong? I should see that I like it my feed, am I correct?

  20. Que says

    I have added the code on single.php , but the button doesn’t appear on all my post.
    If I add the code on every post (from HTML tab), the button appear but encountered problem.
    Why this happen? Is it depend on the theme?

    • Editorial Staff says

      It will appear on all single post pages. If you mean that you want to show it on all pages in your category pages or your index pages, then you would need to paste the code in your index.php inside the post loop.

      Yönetici

      • Que says

        No, I mean doesn’t show in my posts not pages. Or maybe I placed in wrong part of single.php. Is it possible to paste the code in any part of single.php?
        Thanks.

  21. Andrea says

    This is probably a stupid question, but are the instructions you gave relative to the small “thumbs-up” graphic and text (showing 184 people liked this. Be the first of your friends) at the top of this post? Or are they for the larger square graphic appearing to the left of your post (the one appearing underneath your tweetmeme button that says 45 shares).

    I’d like to just have that larger square graphic on my blog and have it appear next to my tweetmeme button and I’m wondering how to go about that? Is there a tutorial you can direct me to?

    Thank you so much for any guidance!

  22. Jan Weiss says

    I added the code however if you go to the individual post it gets apage that only shows the facebook “like” button and does not take the viewer to the actual post. So now if a viewer goes to the post they lose it. Any suggestions?

  23. Ciociaria says

    Hi to everyone,

    I see more blogs use only the button and the number of persons who like without the phrase “be the first….”

    how is it possible?

    thanks

  24. Mike says

    I have noticed many sites have added the button to the top of the page. But isn’t it a better idea to place the button at the bottom of the page, allowing readers to click without scrolling up after they have finished reading the article ?

      • Stu says

        Re: Atahaulpa – I had the same issue as Heather. Solution: In Dashboard, go to Appearance – Atahaulpa Theme Options – Style and edit center column. Paste it in “The LOOP” section. Works like a treat!

  25. Stu says

    Been noticing this Facebook like button appearing on more and more sites lately and think it’s a great idea. Time to see if I can implement this now… WITHOUT completely destroying my blog (you’d be surprised how close I’ve come multiple times once I start messing with the code – programmer FAIL).

  26. Amanda says

    Love the article but I have encountered some problems. I don’t know where to find the single.php file? lol. Could you guide me? I use wordpress.com and I’m not sure if that makes a difference.

    Thanks!

Bir Cevap Bırakın

Yorum bırakmayı seçtiğiniz için teşekkür ederiz. Lütfen tüm yorumların yorum poli̇ti̇kasi uyarınca denetlendiğini ve e-posta adresinizin yayımlanmayacağını unutmayın. Ad alanında anahtar kelime KULLANMAYIN. Kişisel ve anlamlı bir sohbet edelim.