Not able to embed Facebook post in my WordPress blog
-
I am trying to Embed a FB post on my WordPress blog.
I have copied the embed code of the post from FB. Pasted it in the text editor and clicked on publish. When post, I can see the code (it does not get converted like in the FB preview). I followed instruction from here : http://www.socialmediaexaminer.com/embedded-facebook-posts/
This is the code I am pasting :
<div id=”fb-root”></div> <script>(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/all.js#xfbml=1”; fjs.parentNode.insertBefore(js, fjs); }(document, ‘script’, ‘facebook-jssdk’));</script>
<div class=”fb-post” data-href=”https://www.facebook.com/edcoogle/photos/a.1429392507299450.1073741831.1384671208438247/1468753403363360/?type=1″ data-width=”466″><div class=”fb-xfbml-parse-ignore”>
Post
by Edcoogle.</div></div>The funny thing is that if you look at the code closely includes the facebook page link – – which get’s converted but the part “</script>
<div class=”fb-post” data-href=”https://www.facebook.com/edcoogle/photos/a.1429392507299450.1073741831.1384671208438247/1468753403363360/?type=1″ data-width=”466″>” get’s deleted ! in the text editor and doesn’t show up in the post.Here’s the wordpress post link : http://edcoogle.wordpress.com/2014/06/28/the-triple-frontier/
Can somebody please help me here?Thanks a ton !
The blog I need help with is: (visible only to logged in users)
-
You cannot use that code on a WordPress.com blog for security reasons. http://en.support.wordpress.com/code/#javascript Our blogs are not free standing blogs. They are all one the same multiuser blogging platform and share a common architecture that increases security rises. See here for a full explanation Why javascript is a security risk because most people posting here don’t seem to know how JavaScript operates and that that one bad script can bring down many blogs on any multiuser blogging platform.
For Facebook integration see here please http://en.support.wordpress.com/facebook-integration/
-
I followed instruction from here …
That code is only for WordPress.ORG installs. WordPress.com and WordPress.org are completely separate and different. For clarity read http://support.wordpress.com/com-vs-org/
-
Thank you..that cleared some confusion.
But, I am still not able to embed a post on WordPress blog. I tried following the instructions here :
http://en.support.wordpress.com/facebook-integration/facebook-embeds/I tried both methods given in there. The URL for my post is : https://www.facebook.com/edcoogle/photos/a.1429392507299450.1073741831.1384671208438247/1460463507525683/?type=1
Using the first method, I just pasted this in my blog’s post editor from admin. On publishing, the link shows as it is and doesn’t get converted into the embedded post as it should have.
Next i tried Embedding with a shortcode and pasted this in my blog’s post editor from admin : [facebook url="https://www.facebook.com/edcoogle/photos/a.1429392507299450.1073741831.1384671208438247/1460463507525683/?type=1"]
Again it does nothing. What might I be doing wrong?
Thanks!
- The topic ‘Not able to embed Facebook post in my WordPress blog’ is closed to new replies.