Using your Facebook Page to feed your Blog posts.

Posted by Michael on Aug 18, 2011 in Facebook, Webmaster Tools |

In this article I will show you the steps I took to feed my Facebook page to the blog on my website. Items you will need for this tutorial: 1) Facebook fan page, 2)feedburner account, 3)an html page on your website where you would like to place the feed.)

Step 1:

  1. Go to your Facebook Fan Page
  2. On the lower left side click on “Subscribe via RSS”
  3. Inside the URL that shows up copy or write down your ID# (i.e. id=105481499496501)

Step 2:

  1. Go to your Google feedburner account and in the “Burn a feed right this instant” form place http://www.facebook.com/feeds/page.php?format=atom10&id=105481499496501 , replace my top five games id, with yours of course
  2. Click “Next”
  3. Feed Title and Address are automatically filled in, feel free to change the Title or the Subfolder of the URL, do not change the root URL.
  4. Click “Next”
  5. Click on the link that shows up for your feed
  6. in the “Subscribe Now” box click on “View Feed XML”
  7. Copy or write down this URL (i.e. http://feeds.feedburner.com/TopFiveGamessFacebookWall?format=xml”)

Step 3:

  1. Now on one of your pages, probably your blog page, include the code:
<?php
$xml = simplexml_load_file(‘http://feeds.feedburner.com/HoodaMathsFacebookWall?format=xml’);
foreach ($xml->entry as $entry)
{
print “<p>”;
$date = substr($entry->published,0,10);
$date = strtotime($date);
print date(‘F d, Y’,$date);
print “<br \>{$entry->content}</p><br \>”;
}?>
2. you have to save your page with a .php tag instead of .html
3. If you copied and pasted the code, you may need to delete and retype the single and double quotes, because they came across stylized.
4. don’t forget to switch out my xml url (i.e. http://feeds.feedburner.com/HoodaMathsFacebookWall?format=xml) for your own.

1 Comment

  • Andy Fine says:

    Nice post, especially impressed that you had the foresight to realize that people could have an issue if they didn’t realize they had to have the regular quotes.
    One question: Each post that I make has the date, which is on top of the text, which is above the image, and underneath each image it says “wall photos”. Is there any way to control this so that it shows the image with out saying “wall photos”? You can see what I’m talking about here: http://www.slimekids.com/blog.php

Leave a Reply

XHTML: You can use these tags:' <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Copyright © 2009-2012 Michael Edlavitch All rights reserved.
Math Games