Facebook page plugin

Posted in: Newspaper
Post count: 19

Hi,

I would like to display Facebook Events on my website.

The instructions on the Facebook page seem fairly simple.
https://developers.facebook.com/docs/plugins/page-plugin

Step 1: Include the Facebook JavaScript SDK on your page once, ideally right after the opening body tag.
Step 2: Place some code wherever you want the plugin to appear on your page.

Has anyone done this before using the Newspaper theme? Does the Newspaper theme already include the Facebook Javascript SDK? Is there anything I should know to get this working? Thanks.

Cheers,
Janelle

Post count: 19

and where do I add the below code to include the Facebook Javascript SDK? In the “Custom Code > Custom Javascript” section of the Theme panel?

Do I need to modify the code at all as the Newspaper Theme panel says not to include the script tags.

<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 = ‘https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0&#8217;;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));</script>

Any help is much appreciated! Thank you.

Post count: 20688

Hi,

They mention the code has to be entered after the opening body tag, that would be here
https://www.screencast.com/t/2NcG8SwaV
https://www.screencast.com/t/LAcf1jXNv
The other code has to be entered where you want the element to appear, so that would be up to you.

Thanks

Post count: 19

Thanks for the quick response, I followed your instructions and it’s working now!
Cheers,
Janelle

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.