: Embed Facebook Page Plugin I've been following facebook instructions in order to embed their "page plugin" in my website, and failing. (See instructions here.) Would you please take a look at
I've been following facebook instructions in order to embed their "page plugin" in my website, and failing. (See instructions here.)
Would you please take a look at my code and help me out? thanks in advance!
<body>
<!-- Include the JavaScript SDK -->
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/es_LA/sdk.js#xfbml=1&version=v2.3";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<!-- Include the plugin -->
<div class="fb-page" data-href="https://www.facebook.com/instagram"
data-width="280" data-hide-cover="false" data-show-facepile="false"
data-show-posts="true"></div>
</body>
More posts by @Gloria169
2 Comments
Sorted by latest first Latest Oldest Best
Turns out the solution was quite simple:
I just added the script section INSIDE body tag, right AFTER the plugin and it started working.
Thanks!
Simple placement error, you have your javascript within the <body> tags whereas they should be outside of it.
Just move your first seven lines of code so that they are after your tags. See below;
<!-- Include the JavaScript SDK -->
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/es_LA/sdk.js#xfbml=1&version=v2.3";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<!-- Include the plugin -->
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.