Simple Facebook Connect Extensions

Create Facebook events automatically when you create WordPress posts. This plugin creates events in personal Facebook profiles, and can also create them for Facebook Pages.

This plugin has now been updated to work with Facebook’s Graph API and the latest version of Otto’s Simple Facebook Connect plugin.

To create a Facebook event with this plugin, create or edit a post, scroll down the page to the Create Facebook Event section, fill in the event title and start time, tick the Create Public Facebook Event box and Update or Publish your post.

This is a WordPress plugin that extends the excellent Simple Facebook Connect series of plugins by Otto.

Provided you are “Connected to Facebook” using the SFC plugin, an event will be created in your Facebook profile or your Facebook Page. If you are not logged into Facebook when you try to create an event, the plugin does nothing. The plugin handles Facebook security properly, and will ask you to authorize it to create Facebook events the first time you use it. Your browser must allow pop-ups for this authorization from Facebook to appear.

The plugin includes a function called sfce_create_event() that enables WordPress blog developers to create Facebook events simply by calling this function.


  • 4.00.3 Moved Facebook Create Event permissions dialogue to user profile page, so it is accessible to non-admin users.
  • 4.00.2: Minor bug fixes, plus added support to request Create Event permission from Facebook. Useful for clean install of this plugin (v3.x handled this correctly, but 4.00.1 did not).
  • 4.00.1: Updated to work with Version 1.x of Otto’s Simple Facebook Connect. Bug fixes mean this plugin is now more stable too.
  • 3.96.3: Bug fix for input validation added in 3.96.2.
  • 3.96.2: Added some error checks to ensure event photos meet Facebook requirements, and explain how to correct things if your photo is not specified correctly.
  • 3.96.1: Fixed bug affecting version numbers and auto updates. Also fixed bug that caused SFCe to appear twice in some WordPress lists.
  • 3.95.9: Fixed bug that caused errors if event created using Post editor and no group ID available to invite people. Bug affecting events for personal profiles fixed, previously limited to Page profiles. Various bug fixes affecting event invitations. Added ability to invite to events members of a Facebook group. In this version this feature works only via the scfe_create_event PHP function. GUI support coming soon. Minor bug fix to correct validation check on settings page Privacy box. Thanks to Samuel Debruyn for reporting. 3.95.4 Minor fix – for compatibility with PHP installations that don’t allow PHP shorthand. Fixed bug affecting month selector in Post editor panel. Fixed bug that caused error message relating to required fields for posts where no event was required.
  • 3.95.1 Now works seamlessly with legacy code written for v1.0 of this plugin. Bug fixes for a few issues introduced by 3.94.2.
  • 3.94.2 The visual editor now allows you to mix text with data from your post. If you include [TITLE] in any text field it will be replaced by the post title when the Facebook event is created. You can include data from “custom fields” by putting the custom field name in double square brackets – e.g. [[custom_field]]. The Settings page now has option to disable the Create Facebook Event panel in the main “post” editor. People that use PHP to call sfce_create_event() directly from their template should probably use this option. Updated some static text and attempting to fix version number pie chart data displayed on
  • 3.92: New admin “Settings Page” for configuring default values for event details e.g. Name of Event, Host etc.. The Settings Page also enables event details to be hidden from the Create Event section of the Post Editor page. Support also added for internationalization; if you would like to translate this plugin to your language please let me know, I’d be very happy to include your translation with the plugin.
  • 3.1 major upgrade: Added a section to “New Post”/”Edit Post” with input fields for start date/time and other details about your event. To create an event from your WordPress Blog just fill in these fields and press “Update” to save your post.
  • 2.1 Removed file:sfce-facebook-time.php as this code is now redundant. If the automatic upgrade fails delete the “simple-facebook-connect-extension” directory from your server then re-install this plugin.
  • 2.0 Update to remove work-around calculations for Facebook bugs affecting Events (these Facebook bugs have now been fixed). Please ensure you enable the Timezoneless Events migration in your Facebook app settings before upgrading to this version of the plugin.
  • 1.0 Stable first release, tested and working with WP 3.0.1.

13 Responses

  1. xcelguy says:

    I am trying to add the call in php , for this when a user submits an event.

    sfce_create_events() is what you suggest to add in the php

    here is the event.php code:
    note I tried to add it but not sure if this is how, thanks but it says sfce_create_events() is not defined..

  2. socialchild says:

    Just downloaded this from WordPress, and I’m hoping that it will solve a long-standing problem. I installed it a few minutes ago and went to the settings page and it was a mess. When I looked at the code using the plugin editor, I discovered that this:

    echo '’;
    _e(‘Create Facebook Event Configuration’, ‘sfce-create-event’);

    should be this:

    echo '’;
    _e(‘Create Facebook Event Configuration’, ‘sfce-create-event’);


  3. Hi,
    I get an error when trying to publish an event:

    Error message: Invalid parameter Error code:100
    Warning: Cannot modify header information – headers already sent by (output started at /var/www/ in /var/www/ on line 890

    I use WP 3.1 – any solution?

    • admin says:

      I haven’t tested with wp3.1 but would be surprised if that is the problem. Could you confirm you have Otto’s Simple Facebook Connect plugin loaded and that it is working properly?

    • Yep, I have Otto’s SFC installed, and it’s working – For example, I can easily post on my fanpage wall via SFC.

      As I read the errormessage, it’s in the SFCe’s create-event.php-file…I’ve googled the error-messages and a lot of errormessages like this turns out to be a simple space in the code …could that be the case?


      • admin says:

        I don’t think it is a simple problem with the code – the same code is working on a lot of other sites. The error message says you have an invalid parameter, and the error message comes from Facebook when you try to create an event. This suggests a problem with one of the parameters you are sending to Facebook – e.g. start hour, host etc. Please try creating an event with all parameters empty except the even name, start time and end time. Don’t forget to make sure the default values in the Settings page are empty too.

  4. noah says:

    Hello, I would love to be able to post events to my facebook from my wordpress blog. Is there a tutorial or example code? I am confused about how to use your plugin!

    • admin says:

      You need to use some PHP to call the plugin – this is because each time you call the plugin you’ll want to create a new event with different details from the last one, so the only way to do that is to pass different values for things like the date and time to my plugin each time you call it.

      There’s some example code in the FAQ page on the WordPress site, but I just noticed there was a bracket missing in the sample code, so I’ve fixed it and copied the fixed version here (see below). I don’t know how experienced you are with PHP, so sorry if I’m telling you things that are obvoious. To test out the plugin and get yourself started, you could replace the variables in the example code (the variables are things that start with a $ sign, like $host) – with some text in quotes, like ‘Roger’. For testing purposes you could add that code to one of your WordPress page templates, then each time you view the page you’ll create an event.

      You need to setup a facebook app, but you would have done that while installing SFC by Otto. The first time you try and use this plugin you’ll get a popup from Facebook asking you to authorize this plugin so its allowed to create events. After that, things should work smoothly.

      Once you’ve got things working properly, you’ll probably find it more useful to add the code to a custom plugin that gets called each time you write a post, so you could automatically create an event relating to the post. Explaining all that a bit beyond the scope of this reply, get in touch with me directly if you’d like more info.

      if (function_exists('sfce_create_event')) sfce_create_event( array( 'name' => $name, 'description' => $fbdescription, 'host' => $host, 'post_id' => $post_id, 'tagline' => 'Let\'s Skate Together!', 'is_fanpage' => TRUE, 'privacy' => 'OPEN', 'timezone' => 'Europe/London', 'day' => $_POST['eday'], 'month' => $_POST['emonth'], 'year' => $_POST['eyear'], 'start_hour' => $start_hour, 'start_min' => '45', 'end_hour' => $end_hour, 'end_min' => '00') );

      • admin says:

        Hi Noah, Not sure if you’ve seen it but I released a major update recently that allows you to enter all the data about your event while you’re creating or editing a post. Its a full graphical editor now, so you don’t need to use PHP to create events.

Leave a Response

You must be logged in to post a response.