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

Så här installerar och konfigurerar du Facebook Comments i WordPress

Vill du installera och ställa in Facebook comments i WordPress?

Facebook är det största sociala nätverket i världen. Det är därför många WordPress bloggar använder Facebook comments på sina webbplatser för att öka synligheten på plattformar för sociala medier och nå en bredare publik.

I den här artikeln kommer vi att visa dig hur du enkelt installerar och ställer in Facebook comments i WordPress, steg för steg.

How to install and setup Facebook comments in WordPress

Pro och Contra med att använda Facebook Comments i WordPress

Innan vi börjar med tutorialen, låt oss täcka för- och nackdelar med att använda Facebook-kommentarer jämfört med standard WordPress kommentarer.

En av de mest uppenbara fördelarna med att använda Facebook comments är att det kan öka din websites synlighet på Facebook.

När någon lämnar en kommentar på din WordPress-webbplats kan de kontrollera alternativet ”Posta också på Facebook” för att dela sin kommentar med sina Facebook-vänner. Detta har en enorm potential för ytterligare trafik till din website.

Facebook comments preview

En annan fördel med att använda Facebook comments är att det tar bort anonymiteten. Så användare är mindre benägna att lämna skräppost kommentarer eftersom de är knutna till sina Facebook profiler.

Detta kan dock också fungera som en stor nackdel.

Vissa användare kan känna sig obekväma med att lämna en comment via sina profiler på Facebook eftersom de gillar att vara anonyma.

En annan nackdel med kommentarer på Facebook är att de ej lagras eller synkroniseras med WordPress. Däremot gillar tredjeparts kommentarsystem som Disqus synkroniseras med WordPress .

Om du dessutom har äldre inlägg med standard WordPress-kommentarer kan dessa kommentarer visas före eller efter Facebook-kommentarerna.

Därför rekommenderar vi att du helt och hållet tar bort WordPress -kommentarsystemet om du vill använda Facebooks kommentarsystem på din WordPress -blogg. Annars kan spammare och bots använda WordPress comments för att skräpposta din website.

Nu när du känner till för- och nackdelarna ska vi ta en titt på hur du installerar och ställer in Facebook comments i WordPress:

Metod 1: Ställ in Facebook Comments i WordPress med hjälp av ett gratis plugin

Du kan titta på det här videoklippet för att förstå den första metoden. Men om du gillar skriftliga instruktioner kan du rulla ner.

Subscribe to WPBeginner

Först måste du installera och aktivera pluginet Lazy Social Comments. För mer instruktioner, se vår guide för nybörjare om hur du installerar ett plugin för WordPress.

Efter aktivering, besök Settings ” Lazy FB Comments page från WordPress admin sidebar.

Visit the plugin settings for Facebook comments

För att använda Facebook comments på your website måste du skapa en Facebook app och sedan add to applikationens ID:n på pluginets settings page.

Om du redan har en Facebook-app kan du använda dess ID.

Men om du inte har skapat en app ännu måste du först besöka Meta for Developers page och skapa ett utvecklares konto.

Note: Innan du skapar ett konto för utvecklare, glöm inte att logga in på ditt Facebook-konto.

När du har registrerat dig som en Meta utvecklare, klicka bara på länken ”Mina appar” i det övre högra hörnet av vyn.

Click on the My Apps link

Då kommer du till dashboarden för utvecklare.

Därefter klickar du bara på knappen ”Skapa app” för att starta processen.

Click on the Create App button

Detta tar dig till sidan ”App Creation”, där du ska välja alternativet ”Business” som apptyp.

Klicka sedan på knappen ”Next” längst ner för att fortsätta.

Choose an app type

Efter det måste du ange ett namn på appen och en email address som kan användas för att kontakta you.

Se till att använda en företags email address som du regelbundet kontrollerar så att du kan få updates om din Facebook App.

När du har fyllt i detaljerna klickar du på knappen ”Skapa app”.

Provide an app name and email address

Facebook kommer nu att skapa en new app åt dig och redirecta dig till appens dashboard.

You can see here your APP ID displayed in the top left corner of the screen.

App dashboard

Nu måste du berätta för Facebook hur du vill använda appen. För detta, head till Settings ” Basic link från den vänstra colonnen.

Klicka sedan på knappen ”+ Add platform” längst ner på sidan.

Click Add platform button

Detta öppnar ett new popup-fönster.

Härifrån måste du välja alternativet ”Website” som din plattform och sedan klicka på knappen ”Next” för att fortsätta.

Select Website as the platform

This will add a new ’Website’ section to your app’s settings page.

Här är det bara att copy and paste din WordPress website’s URL. Därefter klickar du på knappen ”Save changes”.

Type website URL

Därefter måste du kopiera APP-ID:t högst upp och sedan klistra in det i boxen ”FB Application ID” på sidan för plugin-inställningar i din WordPress dashboard.

När du är klar rullar du ner och klickar på knappen ”Save All Changes” för att spara dina inställningar.

Type App ID

Nu kommer en new ”Moderate Comments” tabs att visas bredvid plugin-namnet högst upp. Vi kommer att förklara hur man granskar kommentarer på Facebook i nästa section.

Detta plugin kommer också med en omfattande uppsättning alternativ. Du kan gå igenom settings för att se om det finns något som du gillar att ändra.

Till exempel kan du ändra alternativet Ladda kommentarer till ”Vid rullning”. Denna inställning kommer att ladda systemet för kommentarer på Facebook endast när någon når slutet av artikeln. Detta kan bidra till att förbättra sidans laddningshastighet.

Choose the option of loading comments on scroll from the dropdown menu

I övrigt bör standardinställningarna fungera för de flesta websites.

Nu kan du besöka vilken post som helst på din WordPress site för att se Facebook comment system i action.

Facebook comments preview

Granska kommentarer på Facebook på din website

Som administratör av Facebook appen kommer du att få notifications om new comments när du loggar in på ditt Facebook account.

Du hittar också en länk för att granska kommentarer på pluginets inställningssida i WordPress dashpanelen.

Click on the Moderate Comments link

När du klickar på länken kommer du till sidan ”Comment Moderation Tool”.

Klicka sedan på länken ”Settings” för att ställa in reglerna för moderation av kommentarer på Facebook.

Click on the Settings link

Detta kommer att öppna en popup där du måste klicka på tabben ”Moderation Rules”.

You can decide the maximum character limit that will be allowed in a comment. You can also set the number of days after which the comments will be automatically closed on your posts.

Use the moderation tool

Facebook allow you also to add new comments moderations.

Klicka bara på tabben ”Moderations” och lägg sedan till en person genom att skriva in namnet i textrutan och klicka på profilen.

Add comment moderators

När du är klar klickar du på knappen ”Save” för att tillämpa dina Settings.

Så här displayed du antalet kommentarer på Facebook i WordPress

En av nackdelarna med att använda Lazy Social Comments plugin är att det tar över funktionen för att räkna kommentarer i WordPress. Genom att göra det matar det ut en Facebook-märkt version av antalet kommentarer.

Om your theme displayed a comment count, då skulle detta inte se bra ut.

Om du fortfarande vill visa antalet kommentarer på Facebook kan du göra det med hjälp av ett code snippet.

Tänk dock på att om du gör minsta error när du editerar dina theme-filer kan det förstöra din website.

Vi rekommenderar att du använder WPCode för att add to kod till din website. Det är det bästa code snippet plugin på marknaden som allow you att lägga till custom code på ett säkert sätt.

Först måste du installera och aktivera pluginet WPCode . För mer detaljer, se vår guide för nybörjare om hur du installerar ett plugin för WordPress.

Note : Du kan använda det gratis WPCode plugin för denna tutorial. Men för att låsa upp fler funktioner som ett molnbibliotek med code snippets, villkorlig logik och mer, behöver du premiumplanen för pluginet.

När pluginet har aktiverats, besök Code Snippets ” + Add Snippet page från admin sidebar.

Härifrån klickar du på knappen ”Use Snippet” under alternativet ”Add Your Custom Code (New Snippet)”.

Add new snippet

När du är på sidan ”Create Custom Snippet” börjar du med att skriva ett namn för ditt code snippet.

Välj sedan ”HTML Snippet” som ”Code Type” från dropdown-menyn på höger sida av vyn.

Choose HTML as the code type for the Facebook Comments count code snippet

Följ detta genom att copy and paste följande kod i boxen ”Code Preview”:

<fb:comments-count href="<?php echo get_permalink($post->ID); ?>"></fb:comments-count> Comments

Därefter måste du rulla ner till ”Insertion” -sektionen.

Välj sedan ”Auto Insert” som metod för att infoga koden så att den automatiskt körs på din website.

Choose an insertion method

Efter det måste you välja en location för your code snippet.

Välj bara ”Insert After Content” som location i dropdown-menyn.

Choose a code snippet location

Gå nu tillbaka högst upp på sidan och toggle omkopplaren ”Inaktiverad” till ”Aktiv”.

Slutligen klickar du på knappen ”Save Snippet” för att spara dina Settings.

Save and activate the Facebook Comment Count snippet

Your Facebook comment count kommer nu att visas på varje post.

Facebook comment count preview

Metod 2: Ställ in Facebook Comments med hjälp av SeedProd (Easy)

Om du letar efter ett enklare sätt att ställa in Facebook comments, då är den här metoden något för dig.

Vi kommer att använda SeedProd plugin, som är den bästa WordPress page builder plugin på marknaden. Det allow you att skapa themes och landing pages from scratch utan att använda någon kod.

Först måste du installera och aktivera pluginet SeedProd . För mer instruktioner, vänligen se vår Step-by-Step guide om hur du installerar ett WordPress plugin.

Note: SeedProd erbjuder också en gratis version som du kan prova. Vi kommer dock att använda premium-versionen av tillägget för denna tutorial.

Efter aktivering, besök SeedProd ” Settings page från admin sidebar för att enter license key.

You can find this information in your account on the SeedProd website.

Paste license key in the field

Därefter headar du över till SeedProd ” Landing Pages section från WordPress admin sidebar och klickar på knappen ”Add New Landing Page”.

För denna tutorial kommer vi att lägga till Facebook-kommentarer till en landing page. Om du vill kan du också customize ett helt nytt theme för din website med hjälp av SeedProd.

Click the Add New Landing Page button

Du kommer nu till vyn ”Välj en ny template”. Här kan du välja en av de många färdiga templates som erbjuds av SeedProd eller skapa din egen template.

När du har gjort det kommer du att bli ombedd att enter ett namn på page och välja en URL. När du har gjort det klickar du på knappen ”Save and Start Editing the Page” för att fortsätta.

Landing page title and URL

Detta kommer att starta SeedProd drag and drop page builder, där du kan börja editera sidan. För mer detaljer, vänligen se vår guide om hur man skapar en landing page i WordPress.

Härifrån måste du söka efter blocket ”Facebook Comments” i sökfältet.

När du har lokaliserat det kan du drag and drop blocket ’Facebook Comments’ till vilken plats på sidan som du gillar.

Choose the Facebook comments block

Dubbelklicka sedan på blocket ”Facebook Comments” på vyn för att öppna dess inställningar i den vänstra kolumnen.

Härifrån kan du bestämma antalet Facebook comments som ska visas, välja order, färgschema, mål-URL, URL-format och mycket mer.

Du kan också lazy loade kommentarerna genom att toggle ”Lazy Loading” till ”Yes”.

Configure the Facebook Comments block Settings

Därefter måste du klicka på länken ”Page Settings” i det övre vänstra hörnet av vyn.

Sedan rullar du ner till alternativet ”Facebook App ID” och enter ditt Facebook App ID.

Enter the Facebook App ID in SeedProd

När du är klar klickar du bara på knappen ”Save” högst upp.

Kommentarerna från Facebook kommer nu att visas på din WordPress website.

Facebook Comments preview with SeedProd

Bonus: Add to Facebook gillar reaktioner till WordPress Posts

Förutom att lägga till Facebook-kommentarer kanske du också vill lägga till Facebook-liknande reaktioner på inläggen på din WordPress-blogg. Dessa reaktioner är en uppsättning emojis som besökarna kan använda för att uttrycka sina åsikter om ett blogginlägg.

Detta gör din blogg mer intressant och kan öka engagemanget.

Facebook Lets Users React to Posts With the Like Button

För att add to dessa reaktioner måste du installera och aktivera pluginet WP Reactions Lite. För detaljer kan du se vår guide för nybörjare om hur du installerar ett plugin för WordPress.

Vid aktivering, besök WP Reactions ” Global Activate page och klicka på knappen ’Customize Now’. Detta kommer att ta dig till en new vy där du kan select de emojis som du vill add to som reaktioner.

Choose emojis

Klicka sedan på knappen ”Nästa” för att gå vidare. Här kan du välja dina reaktionsplaceringar som ’Posts’ och ’After Content’.

När du har gjort det kan användarna lägga till Facebook-liknande reaktioner och posta Facebook-kommentarer på dina artiklar när de har slutfört läsningen av dem.

Select emoji placement

You can even add a CTA, font color, and border styling with the plugin. När du är klar, glöm inte att klicka på knappen ”Save and Exit” för att lagra dina settings.

Du har nu utan problem lagt till Facebook-liknande reaktioner. För detaljer, se vår tutorial om hur du lägger till Facebook-liknande reaktioner till din WordPress posts.

Facebook like reactions preview

Vi hoppas att den här artikeln hjälpte dig att installera och konfigurera Facebook comments på din WordPress-webbplats. Du kanske också vill kontrollera vår guide om hur man skapar ett custom Facebook feed i WordPress och våra toppval för de bästa sökmotorsoptimeringspluginsen för att utveckla din webbplats.

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.

Avslöjande: Vårt innehåll stöds av våra läsare. Det innebär att om du klickar på några av våra länkar, kan vi tjäna en provision. Se hur WPBeginner finansieras, varför det är viktigt, och hur du kan stödja oss. Här är vår editoriala process.

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.

Den ultimata WordPress-verktygslådan

Få GRATIS tillgång till vår verktygslåda - en samling WordPress-relaterade produkter och resurser som varje professionell användare bör ha!

Reader Interactions

113 kommentarerLämna ett svar

  1. Syed Balkhi

    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. NATHAN

    And can the WP Comment section be customized to look like that of Facebook if one needs to redesign it?

    • WPBeginner Support

      It would require some work but you could certainly style your comment section to look similar to Facebook’s

      Administratör

  3. David

    Hi,

    I set it up according to this article. Comments work, but I can’t see the comments in moderation. Every column including ”public” is empty. How can I delete published comments for example?

    Thank you

    David

    • WPBeginner Support

      You would want to go into the plugin’s settings for the link to your comment moderation.

      Administratör

  4. Samantha Collier

    Thank you for these instructions. I’ve tried to install Facebook comments for a long time and this is the first time it’s worked.

    • WPBeginner Support

      Glad our guide was able to help :)

      Administratör

  5. Lisa Marie

    Thanks so much for this! Your site is incredibly helpful! I appreciate what you all do sooooooooo much!!!!!

    • WPBeginner Support

      You’re welcome, glad our articles have been helpful :)

      Administratör

  6. Boris

    Awesome, Thanks!

    • WPBeginner Support

      You’re welcome :)

      Administratör

  7. Daniel

    Thanks. The plugin is very useful indeed.
    It seems that the Plugin has changed its name to ”Lazy Social Comments”, and is being supported by other people.

    • WPBeginner Support

      Thank you for letting us know, we’ll be sure to look at updating this :)

      Administratör

  8. malika

    thanks for sharing useful information !

    • WPBeginner Support

      You’re welcome :)

      Administratör

  9. Joseph Parker

    As per my personal experience, Facebook Comment is one of the best ways to increase your visitors to comment on a post or interact with existing comments.

    • WPBeginner Support

      Thanks for sharing your personal experience :)

      Administratör

  10. Ricky

    Post comment error handle on same page ?

    • WPBeginner Support

      If the plugin is having an error, if you reach out to the plugin’s support they should be able to assist :)

      Administratör

  11. priyank

    really helpful. I tried the mentioned plugin and it totally worth it

    • WPBeginner Support

      Glad our guide was helpful :)

      Administratör

  12. Muhammad Arslan

    That plugin has been closed on author’s request. Please update the post.

    • WPBeginner Support

      Thank you for letting us know, we will certainly take a look into updating the article.

      Administratör

  13. Mohammad

    The Facebook plugin mentioned has been disabled by its author. Please update.

    • WPBeginner Support

      Thank you for letting us know, we will certainly take a look into alternatives for Facebook Comments

      Administratör

  14. Jakobe

    this plugin has been discontinued, what do you reccomend?

  15. Prashanth

    Was able to add the facebook comments plugin successfully. But, the default wordpress comments section is also showing below. How do I remove it?

  16. Prashanth

    Which plugin do you use for social sharing, that is below the posts (has the share counter too)

  17. Rajendra Zore

    You may want to update this article as the plugin author of Facebook Comments has stopped supporting it & prompting to switch to the Spot.IM Comments plugin instead.

  18. Raj

    Dear Wpbeginner. Nice article. Installed FB comments. everything working fine. Is there any waty to enable ”Also post on Facebook” selecxt box?

  19. Hosana

    You need to review this article! The plugin you’re referring to is no longer being updated and is days away from breaking (when the older FB API will be deactivated). The developer started up spot.im which I guess he’ll have his hands full with.

    Also I don’t really see any other good plugins for this, they all have a small install base, unsolved issues to which they aren’t responding, no proven compatability with latest wp version, …

    • WPBeginner Support

      Hi Hosana,

      Thanks for the suggestion we will look into it. You can also try to reach out to plugin developers for support.

      Administratör

  20. zhul

    but how to change text color?
    i used dark themes and i can’t see any comment

  21. Elizabeth

    Is there a way to turn off the comments on certain posts?

  22. sam

    how to mirror the facebook comment on facebook page with facebook comment on wordpress blogpost and vice versa?

  23. Jenn

    Thanks, this article was very helpful! I followed your instructions, and everything appears to be working on my site.

  24. Chankey Pathak

    This plugin does not work anymore.

  25. Uchiha

    Im having trouble using this into my wordpress site. Please help me

  26. Nilesh

    Hey, great article and very useful. Can you link the comments to a Facebook post or page?

  27. Patrice

    The facebook comments plug in is working on my site however I still see the wordpress comments. How do I remove the wordpress comments?

      • Charne Cronje

        Hi David, Hope you are well, Has this plug in for facebook comments been updated for the new wordpress 4.7.2? And perhaps you might also know of a pinterest plugin that doesnt just show the pictures but also the description below, which works with the latest version of WordPress.

        Thank you

        Charne
        xx

  28. Sara

    Hi. I want to know if it’s possible to make the comments on my fanpage’s articles appear directly on my website’s articles and vice versa. Thanks!

  29. Zaharadeen Elfakkawy

    Anytime someone tried to comment they get ’message failed’ error. Pls what’s the solution for thia

    • David chriss

      Hi,

      Even me I Have That Common problem Please WP Beginner Help Us Or Any One can Help Us Please.

      Please Help Us

    • Amit Jain

      Dear Team, What is the name of social share plugin you are using as i wish to install the same. It looks quite simple and sober. Regards, Amit Jain

  30. sohib sanam

    thanks for share the update about facebok comment

  31. Stelaras

    Do you know how i can change the position that the plugin is placed?

  32. Ahmad Farisi

    Thx … but how to set notification to our facebook account if there is a new comment ?

  33. Mahdi

    Hi Everyone, I was looking for a plugin who’s importing my facebook old comment from my facebook fanpage to my wordpress.

    I tried this one but it’s not working, can anyone tell me how it works ?

    I used another methode by commenting the embed comment and looks not really fine

  34. Justin Enjo

    Hi WPBeginner – Quick question about Facebook Comments… How does it effect your SEO? Is it better to keep default WordPress comments or maybe Jetpack comments so that the comment content stays attached to your blog rather than fb? thanks.

  35. Pram

    I can’t find the plugin?

  36. Aman

    This plugin is installed on my site and I have also activated coments mirroring for my page but still comment mirroring is not happening?

    Do you know the way around to do this?

  37. anish

    i have a site

  38. Daniela

    Hello very well explained!! But I have a problem! The comments should show also on my fan page write? …..
    ……I did everything and I get my comments on my wordpress but not SHOWING on my facebook page why?? Help !!!!!! Thanks a lot. Daniela

  39. Vikagutt

    I can’t get the plugin to work in Internet explorer. I can see from other threads on the net that others have the same experience. Some say that header.php should be modified, but I can’t figure out where in the file.
    What to do?

  40. Tabetha

    I set up this plugin with a test app. Right before I was due to launch the website, I had to switch over to the new app that was set up for the business the website was built for. When I changed the app ID to the new app, all of the comments kept going to the old app I set up for testing purposes. Even after I deleted the old app, deleted and reinstalled the plugin and verified that the correct app ID was being used in the api call.

    Now, I have no way to moderate the comments because that old app is deleted and all the new comments are going to that old app even though the app ID I have in the plugin settings is for the new app ID.

    Any ideas?

  41. Steve

    ..that facebook plugin is not updated since 11 months. Moreover, the plugin is made by some developer, and not Facebook. It does not feel very safe to use that plugin. Do you have any alternatives?

    • WPBeginner Support

      Sometimes plugin authors don’t feel the need to update a plugin because there is nothing changed or broken.

      Administratör

  42. Rizwan

    Hi.. When i hyperlink another post from my wordpress blog to new post. All hyper links get shown below with ping back option. I don’t want them to show. Any advice?

  43. mahendra

    great post !!! i have been searching for how to install facebook comments to my site. now i am going to use it on my site
    thank you alot .

  44. Paolo Euvrard

    ok, that’s all fine, I’ll switch to that from now on.

    In order to disable the WordPress comments:
    Settings >> Discussion >> uncheck ”Allow people to post comments on new articles”

    This applies to new posts that you will publish from now on.

    To disallow comments from already publish posts:

    Posts >> select them all and ”Edit” under bulk actions and hit apply >> choose ”do not allow” next to comments and hit update posts.

  45. Autarka

    hey guys,

    regarding to your plugin issues…

    you need ipv6 addresses… without switching from ipv4 to ipv6 it isn´t working…

    kindly, autarka

  46. Mithilesh

    Not getting where to upload the plugin.

  47. nacontact

    Hey, nice article, but I have some questions.

    This blog here:
    When you comment his facebook publication, it’s automatically commenting his blog, keeping the theme of the blog. When he comments his blog, it’s automatically commenting the facebook thread.
    Any idea on how to do that?

    Cheers,

    • Ramon

      Hello,
      I would like exactly the same! Can’t find how to. Did you find the answer to this and would you want to enlighten me? What I’ve been Googling so far is things like:
      ”auto publish to facebook grab retrieve comments”

      Thank you so much!
      Greetings

      • Sara

        I have the same problem. Did you find a solution?

  48. Cynthia Spencer

    I’m hoping it will help out with the user interaction on my site!

  49. vimala

    But that just seemed to take me in a circle, and i never got what I needed.

  50. Kenneth Adair

    There is NO Create App ID button here:

    ”Simply visit the Facebook Apps page and click on the create new app button. You will need to provide a name for your app and click on the Create App ID button.”

  51. Mark

    I just set it up and It’s pulling in 1200+ comments, but I’ve only just created my FB page and I have not comments on it yet. The stuff is from all over the place. How do I get it to just show my FB page’s comments

    • Rob

      I have exactly the same problem and will remove these coments now as it looks so fake. Anyone can see it is not genuine. What a disappointment! There are no instructions either about this, as far as I can see.

      • Esref

        Fake content is a big problem :(

Lämna ett svar

Tack för att du väljer att lämna en kommentar. Tänk på att alla kommentarer modereras enligt våra policy för kommentarer, och din e-postadress kommer INTE att publiceras. Vänligen använd INTE nyckelord i namnfältet. Låt oss ha en personlig och meningsfull konversation.