Facebook, Programming, WordPress

Export your Facebook posts to WordPress

I’m a big proponent of owning the data that you create. I use WordPress (of course) wherever I blog, and I use the Keyring Social Importers plugin to make backup copies of my Twitter updates and Foursquare checkins. And as of today, I am also syncing my Facebook updates back to a private WordPress blog using Keyring Social Importers.

Not familiar with Keyring Social Importers? That’s too bad, it’s amazing. Install it, and within minutes, you can be importing data from any one of a dozen sites to your blog. Remember all of that data you put into Myspace/Jaiku/Bebo/Pownce and how it disappeared when the site shut down? Wouldn’t it have been nice to be able to save a copy of all of that? That’s what Keyring Social Importers makes possible.

There’s no built-in Facebook importer in Keyring Social Importers, so I wrote one. You can use it to save copies of your Facebook photos, photo albums, and status updates to an easy-to-browse (and easy to share) WordPress blog.

To use the Facebook importer, install Keyring Social Importers, copy the keyring-importer-facebook.php file into wp-content/plugins/keyring-social-importers/importers/, and then visit Import > Facebook to get started. Let me know what you think.

Note: I’ve only tested the importer on my own account, so it’s possible that it won’t be perfect. All imported data is set to private, just to be safe. Patches and bug reports are welcome.


32 comments on “Export your Facebook posts to WordPress

  1. I could not import posts to an organization Page, but rather only my personal account (since a Developer account must be linked to a personal page). Any workarounds?

  2. Brian Young says:

    I’m excited about getting more control of my Facebook data!

    I’ve installed Keyring Social Importers, added your Facebook plug-in, setup the Facebook app and app key/secrets in my WordPress Settings.

    Now, when trying to link with Facebook, i get this error:

    “Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App’s settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App’s domains.”

    Any ideas what is going on? Thanks!

    • It sounds like the URL of your WordPress installation doesn’t match the URL you would have entered when you set up your Facebook app. This URL is either in the “App Domains” or the “Site URL” box on the Facebook app settings page. I think they should both be the same, except the “Site URL” has “http://” at the beginning, and the “App Domains” does not.

      • Brian Young says:

        Yes. You’re right.

        The annoying thing is I tried a number of things, but the Facebook app settings page wont accept the domain I put in there. I’m stuck on why it wont work. :(

        • Brian Young says:

          The error I get in the Facebook developers / app settings is:

          This must be derived from Canvas URL, Secure Canvase URL, Site URL, Mobile Site URL, Page Tab URL, or Secure Page Tab URL. Check and correct the following domains: —.———.com

          (The dashes are my domain name. Nothing fancy, I’m just keeping it hidden here.) Any ideas why Facebook doesn’t like my domain? It exists for goodness sake!

    • The way the importer works is it cycles through the APIs to import statuses, photos, and photo albums. Try running it again and see if it didn’t get stuck on photos.

      If that doesn’t work, I’ll have to spend a little more time refining it.

  3. hey gang … I have been looking over your blog today and I installed the plug-in in my wordpress blog. I go to TOOLS>IMPORT and I dont see it there. How does this thing work?

    Thanks for your help

  4. Got it … Looks like I am having the same issues as Brian Young did now.

    “Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App’s settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App’s domains.”

    I tried doing what you suggested for him, but Facebook is not allowing my domain name with or without “http://”. Do you have anymore guidance on this?

    And thank-you so much for the quick reply earlier.

  5. Oi says:

    I’m trying to configure the Facebook importer in my website. Apparently my wall posts are imported to my WordPress site as I see them in the Post section of my dashboard. However, when I click on them to be opened or press ‘View post’ button in the edit page, the link is broken or is not available.

    Any idea on why is this happening?

    Thank you!

    PD. How do I “your app will need to have the permissions “read_stream” and “user_photos.”?” I’m not sure if this is done by default and I can’t figure out how to do it. I thought it was a default setting since when I test the connection Facebook-Keyring it says the connection is working.

  6. Christina says:

    Love this! However, similar to other commenters, I’m only able to import photos. It appears the import is timing out after a while, and I’m redirected to the WordPress “this is embarrassing; this page can’t be found” error page.

  7. I have a volunteer effort with a large facebook following and hundreds if not thousands of posts. The facebook page was temporary, and has its limitations, but we needed something right away, so FB was our first step. Now, the blog is being designed to be our permanent home. The need exists to bring posts from the page into the blog and searched “import facebook posts to wordpress.” This is how we found your page.

    We need to allow posts to be public on the blog, it’s not a private facebook page. It would be great if a form of bulk import could be implemented. Can you suggest a solution?

  8. Richard says:

    I’ve been looking around for something to do this for a client of mine. He is computer illiterate. So, I needed something that would be simple to install and maintain. It took me a while to understand how to get the Facebook Developer Connection to work. Once I did, this has been working good!!!

    NOTE: If the facebook password is changed, then the facebook app needs to be reset.

    THANKS VERY MUCH for the work!!!


  9. Hi,

    Great plugin – I’ve got it working locally on a test site, but for me, when the photos are added to the posts, they’re really small, even though high res ones are in the image library.

    Any ideas?

  10. Ash says:

    Thanks for the Plugin addon
    will it work with a FaceBook profile that is not a page?
    what should I do to make it work?

    Thank you,

  11. Pasqdek says:

    I have problem with this plugin.

    It import from facebook only post text, no one pictures, no one videos or comments…

    Any ideas ?

  12. Thanks for this post – I found it interesting.

    I’m thinking about a slightly different problem: how to import posts from a deleted Facebook account to my WordPress blog.

    About a year ago I closed and deleted my Facebook account, but I exported a ‘takeout’ of all my posts, photos and so on. Would your plugin work with that takeout, do you think?

  13. Mark says:

    Hi, thanks so much for making this. It will be a HUGE help to me.. Struggling to get it to work though..

    First, will it be able to pull from a business’s page? (I didn’t notice anywhere to specify what page I want to draw from).

    Also, I’m getting this error message – “Can’t Load URL: The domain of this URL isn’t included in the app’s domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.” I did put in the URL under APP Domains and Site URL as instructed..

    I’m on WordPress 4.8.2… it did say when I installed that Keyring might not be compatible. Is that what’s happening?

  14. Had to make a slight change to the code as the “read_stream” permission is no longer available, but once that was changed to “user_posts”, I got to use this importer exactly as planned for a Group Page that I’m managing on Facebook. Imported the Group posts into a WordPress instance.

  15. Radu says:

    Has anyone figured how that domain issue can be solved? I’m getting the error regarding the domain name not being in the authorized domains list for that Facebook app. If my domain is abcd.test, what should I have in that list? Thanks!

  16. Hi, I managed to set-up everything, but it seems that there is a code problem. When I try import and connect, I get this error:
    “Invalid Scopes: read_stream, user_photos, manage_pages. This message is only shown to developers. Users of your app will ignore these permissions if present. Please read the documentation for valid permissions at: https://developers.facebook.com/docs/facebook-login/permissions
    Is there a way to fix this ?
    Many thanks, should there be a real solution to this I would encourage all my reader to do the same.

Leave a Reply

Your email address will not be published. Required fields are marked *