How To Fix Facebook Post Embeds On WordPress - Techpill - Tech Tips, News And More

Hot

Post Top Ad

Thursday, 8 October 2015

How To Fix Facebook Post Embeds On WordPress


Early first quarter of this year embedded Facebook posts stopped functioning on WordPress. Not just that it also extended to other platform like blogger, blog etc. so when you embed a Facebook post it will appear as a hyperlink which is not suppose to be so. Some folks argued that Facebook changes their API but embeds made on webpages still appear correctly. This issue has been without fix till now.


This is fix for embeds to work correctly you need to place a snippet of JavaScript including Facebook SDK on the header section of your site.

How To Fix WordPress Facebook Embeds
1. If you’re using Genesis, you can easily go to Genesis > Theme Settings > Header and Footer Script and paste the code in the head section. Using a different WP theme, you can get Header and Footer plugin to implement the code.

2. Copy the code below:

<script>
window.fbAsyncInit = function() {
FB.init({
xfbml : true,
version : 'v2.3'
});
}; (function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>

3. And paste it in the site’s head section.
Thats all! Putting the code in your footer may not work correctly, it has to be in the head section.

Also Read:

Never miss any of my future post CLICK HERE TO SUBSCRIBE Once entered, you will have to check your Inbox for a confirmation email containing a confirmation link. Once you VERIFY your email by clicking on the confirmation link in the message, you will never miss any future articles. 

Like US on Facebook Click Here

kindly share this by clicking on any of the share button below and also we love comment, should incase you have difficulty in doing this notify us in the comment box below

No comments:

Post a Comment

Post Top Ad