72

I am working with a group to help promote a charity event. The page I would like to embed is NOT my Facebook profile, but a Facebook page someone has created.

I would like to show that news feed in my webpage. If I need to get info/access from this page, please let me know. If someone else has a working example, please let me know. I have been using jsfiddle.net to draw it up.

Here's the page: http://www.facebook.com/pages/Chefs-Classic-Knock-OUT-Bout/225835004169328

Somnath Muluk
  • 55,015
  • 38
  • 216
  • 226
NickG
  • 871
  • 3
  • 11
  • 18
  • Is it an facebook event or a facebook page (You used both terms)? – DMCS Feb 08 '12 at 15:32
  • It's a page, hence the "/pages/" portion of the URL. There is technically an event setup on facebook, but the above URL is the location in which updates will be posted. I would like to just show these updates from this page, as opposed to having to retype them on my website. – NickG Feb 08 '12 at 18:03
  • https://developers.facebook.com/docs/reference/api/ your page link appears to be broken – Jan K. Feb 08 '12 at 18:11
  • For website developers, another option you have is to follow a working Facebook Graph API tutorial such as this one https://www.codeofaninja.com/2014/10/display-facebook-page-feed-on-wordpress-or-website.html But if you need a quick solution where you can customize and embed a Facebook page feed instantly, you should use website plugins such as this one https://www.displaysocialmedia.com/display-show-embed-facebook-page-feed-on-website/ – Emkey Jul 12 '17 at 23:28
  • Try a free http://fetchrss.com ;) – KingRider Dec 05 '17 at 10:57

6 Answers6

122

Ahhh, that's super simple, no programming required.

See: https://developers.facebook.com/docs/plugins/page-plugin

You'll want to keep the show stream option turned on. You can adjust width and heigth and a few other things.

Ricardo Martins
  • 5,702
  • 3
  • 40
  • 59
DMCS
  • 31,720
  • 14
  • 71
  • 104
  • By chance, does anyone what is preferred or most supported, HTML5, XFBML, or iframe? – NickG Feb 09 '12 at 19:18
  • 1
    I prefer HTML5 myself. Others tend to lean towards the iframe since there's no need to include any javascript on the host page. Not sure which is most supported to be honest. – DMCS Feb 09 '12 at 19:22
  • 1
    People are complicating this thing, by going through Grpah API and RSS Feeds. It was super simple, Thank you !! – Tushar May 03 '14 at 08:01
  • 1
    Just in case you want it more customized on your webpage, this tutorial is the best solution I found https://www.codeofaninja.com/2014/10/display-facebook-page-feed-on-wordpress-or-website.html – Emkey Oct 27 '14 at 05:55
  • 2
    `With the release of Graph API v2.3, the Like Box plugin is deprecated and will stop working on June 23rd 2015. Use the new Page Plugin instead. The Page Plugin allows you to embed a simple feed of content from a Page into your websites.` – cameronjonesweb Apr 01 '15 at 13:12
6

If you are looking for a custom code instead of plugin, then this might help you. Facebook graph has under gone some changes since it has evolved. These steps are for the latest Graph API which I tried recently and worked well.

There are three main steps involved - 1. Make sure you can code with a server side language (PHP), 2. Getting Facebook Access Token, 3. Calling the Graph API passing the access token.

1. Getting the access token - Here is the step by step process to get the access token for your Facebook page. - Embed Facebook page feed on my website. As per this you need to create an app in Facebook developers page which would give you an App Id and an App Secret. Use these two and get the Access Token.

2. Calling the Graph API - This would be pretty simple once you get the access token. You just need to form a URL to Graph API with all the fields/properties you want to retrieve and make a GET request to this URL. Here is one example on how to do it in asp.net MVC. Embedding facebook feeds using asp.net mvc. This should be pretty similar in any other technology as it would be just a HTTP GET request.

Sample FQL Query: https://graph.facebook.com/FBPageName/posts?fields=full_picture,picture,link,message,created_time&limit=5&access_token=YOUR_ACCESS_TOKEN_HERE

klewis
  • 7,459
  • 15
  • 58
  • 102
Pranay
  • 442
  • 6
  • 14
  • Does this approach allow me to get multiple feeds? I have a sitecore instance that hosts multiple sites and would like to share a single component between each site with multiple feeds under the same dev acocunt – Sean T Aug 12 '19 at 14:40
  • If you make the component little configurable in Sitecore, then you can use the same component changing the keys and fb page name for each of the site in Sitecore. – Pranay Sep 21 '19 at 17:11
4

In new page-plugin you can do multiple tabs in your website. The Page plugin lets you easily embed and promote any Facebook Page on your website. Just like on Facebook, your visitors can like and share the Page without leaving your site.

  1. Include the JavaScript SDK on your page once, ideally right after the opening <body> tag.

<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/sdk.js#xfbml=1&version=v2.5&appId={APP_ID}";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
  1. Place the code for your plugin wherever you want the plugin to appear on your page.

<div class="fb-page" 
     data-href="https://www.facebook.com/YourPageName" 
     data-tabs="timeline" 
     data-small-header="false" 
     data-adapt-container-width="true" 
     data-hide-cover="false" 
     data-show-facepile="true">
  <div class="fb-xfbml-parse-ignore">
    <blockquote cite="https://www.facebook.com/facebook">
      <a href="https://www.facebook.com/facebook">Facebook</a>
    </blockquote>
  </div>
</div>

You can also change the following settings:

enter image description here

Also You can now have timeline, events and messages tabs with the new page plugin:

  • Timeline Tab: Will show the most recent posts of your Facebook Page timeline.
  • Events Tab: People can follow your page events and subscribe to events from the plugin.
  • Messages Tab: People can message your page directly from your website. People need to be logged in to use this feature.

<div class="fb-page" 
  data-tabs="timeline,events,messages"
  data-href="https://www.facebook.com/YourPageName"
  data-width="380" 
  data-hide-cover="false">
</div>
Mr Lister
  • 45,515
  • 15
  • 108
  • 150
Somnath Muluk
  • 55,015
  • 38
  • 216
  • 226
2

The Like Box/ Page plugin is basically an iframe and ugly :D

So I created my own free plugin that I call Famax plugin to display FanPage feeds. It's similar to the like box but has a better UI and is more customizable.

Also because the Like box is shown in an iframe with a fixed width and height etc, its not really responsive.

Patrick
  • 569
  • 4
  • 10
0

Correct me if I am wrong, but it seems that Facebook deprecated the Activity Feed plugin. Additionally there does not seem to be any substitute plugin for activity anymore.

Here is the link: https://developers.facebook.com/docs/plugins/activity

Maksim Luzik
  • 5,863
  • 4
  • 36
  • 57
  • Activity feed is deprecated but now there is [page plugin](https://developers.facebook.com/docs/plugins/page-plugin) available. The Page plugin lets you easily embed and promote any Facebook Page on your website. Just like on Facebook, your visitors can like and share the Page without leaving your site. See [my answer] (http://stackoverflow.com/a/34103284/1045444) – Somnath Muluk Dec 05 '15 at 09:30
0

For website developers, another option you have is to follow a working Facebook Graph API tutorial such as this one.

But if you need a quick solution where you can customize and embed a Facebook page feed instantly, you should use website plugins such as this one.

Here's a step by step guide:

  1. Get a Free Key or Paid Key.
  2. Go to this login page and use the key to login.
  3. Once logged in, click “+ Create Custom Feed” button.
  4. On the pop up, name your custom Facebook page feed.
  5. On the drop-down, select “Facebook Page Feed On Your Website” option.
  6. Enter your Facebook Page ID.
  7. Click the “Proceed” button. This will show you the customization options.
  8. Click the “ Embed On Website” button located on the upper-right corner of the screen.
  9. On the pop up, copy the embed code by clicking the “Copy Code” button.
  10. Paste the embed code on your website.

Visit the tutorial link to see a live demo there as well.

Emkey
  • 5,346
  • 8
  • 38
  • 55