Sorry for the several updates over the last day. Somebody pointed out that I hadn’t pushed a new version of SFC in several months, and that the fixes in trunk had gotten a ways ahead of those in the released version. Unfortunately, I didn’t actually go and test properly, so versions 0.22 and 0.23 had minor but critical bugs in them. Version 0.24 should push shortly with the fixes for those bugs as well as the enhancements over the last several months.

A short list of the changes/fixes:

  • Thanks to Burak Tuyan, the whole plugin is now more i18n capable, for people who want to translate it.
  • Added an sfc_img_exclude filter, to let others add their own image classes to exclude from the automatic image finder for share and publish and such.
  • The sfc_like_button() functions now supports a url parameter to add a like button to a specific URL.
  • A couple of patches by Jamie Zawinski: Publish now sends up to 1000 chars from the post to Facebook.
  • Also thanks to jwz, publish now gets images correctly in more cases.
  • If you enable login avatars (by uncommenting that code), it will show them for comments now too.
  • Eliminated deprecated calls to Facebook functions (xid and register users calls)
  • Custom Post Type support for automatic publishing (any CPT with public=>true will get auto-published).
  • Custom Post Type support for manual publishing (any CPT with public=>true will show the meta box in its edit screen).
  • Contextual help added to SFC Settings page.
  • Improved error messages
  • Numerous other minor optimizations and bugfixes

Version 1.0, which will ditch the old Connect code entirely, isn’t quite ready yet. The new registration stuff will be in there though, eventually. It will probably be after I get back from the core developers meeting though. Sorry for the excessive delay on that. I know lots of people want it, I never seem to have the time. I’ll try to find the time and finish it up soon. Really.

Note to users: If you got the “Breaking change: API deprecations” email from Facebook today, then you are probably using the SFC-Login plugin, or have at some point. Version 0.24 removes the code they are deprecating from the SFC-Login plugin. So upgrade and you’ll be fine. However, note that SFC is no longer compatible with WordPress versions prior to 3.0. Upgrade WordPress to 3.0 or later before upgrading SFC.

Note to international users: And with all that, there’s still a bug. If you’re seeing weird characters in your FB Published posts, edit the sfc-publish.php file. On line 179 you’ll find return utf8_encode($text);. Change it to return $text; to fix the problem with the double encoded characters. The next version will have this fix as well, but I didn’t think it was major enough to push a whole new version right away.



  1. Is “Pull comments back from Facebook published posts into your site” still a viable option for The Future®? I think it would be interesting, but on the other hand, I’m afraid it would be like vomiting YouTube comments all over my site.

    • It is entirely possible to do it, but there is concern about that action possibly violating FB’s Terms of Service. I think it could be acceptable if it was highly limited. For example, it would only be able to pull comments from the posts made automatically via SFC-Publish (to either an App/Page or Profile).

      • That’s how I assumed it would work. A couple of the sites I work with have the user base split pretty evenly between facebookers and luddites (for lack of a better term). It bothers me a little that each group is missing out on the conversation and content from one another.

        If it’s something you’ve already worked on or towards, that’s great–but if not, I might have a look at it. I just don’t want to reinvent the wheel.

  2. Hey Otto,

    Is there a reason why my Admin area’s “incoming links” section are suddenly full of URLs like this?……

    Something broken? I did update it to .24 today.

  3. Does SFC work with YOURLS? I can’t seem to find an option for it and it doesn’t seem to automatically tap the API either. Am I missing something, or is it just not supported yet? If it isn’t, will it be in the future? Thanks!

    • What exactly would SFC use a shortlink for? It doesn’t need one for publishing, as Facebook isn’t space limited like Twitter is. It takes the full link just fine. Also, a shortlink needs a redirect, and since FB is already doing it’s own redirect, you have a problem with too many redirects happening. It’s slow and annoying to use shortlinks on FB Published posts, basically.

      This isn’t a YOURLS specific issue, BTW, it’s about using shortlinks on Facebook in general. Doesn’t make a whole lot of sense.

  4. Hi!

    Thanks for the great plugin! I’m looking for a way to be able to use the “Connect with facebook” button to register the users to the site. Instead it only says “ERROR: Facebook user not recognized.”. Can I use this for registration too? If so, then how?

  5. I updated and now the “Connect With Facebook” is just displaying as text (again).
    Any ideas why? 🙁

    • Actually, beginning to think this is a server issue. (I cannot login properly, I login, click anything in admin it tells me to login again) I use RockMelt, and it displays text. Incognito, works fine. It also works fine in Chrome, Firefox and Opera.

  6. I might be the one too curious about the new version of the plugin 😉
    Just 3 questions about the integration of these plugins :
    – the brilliant “comments” social plugin ?
    – and what about the “recommendations” one ?
    – Do you know if this might be merged into yours ?

    Thanks, and reaaaaally looking forward version 1.0 !

  7. Great plugin, thank you. I have one issue: we use a facebook fan page (instead of an application page). Now every time we post to our fanpage there’s a link to this new application page which links to our website. This is somewhat confusing for our ‘fans’. I don’t think there’s an option to remove this link, is there? I tried to create a more generic application with a link to another site, but then I get a facebook api error 191 when granting extended permission because the uri of the site is not the same of the app. Is there some workaround possible? We don’t want to leave our fan page and use the app page instead because we’re afraid to loose a lot of fans this way.

    • No, that link to the application page can not be removed or altered. Making another application won’t help matters.

      I wouldn’t worry about it, it’s not confusing to the majority of people, because they don’t click on that link often. And when they do, the Go to Application button links back to your home page. Most people click on the picture, or the title of the posted item, etc.

  8. Thanks for your insights. We’ll leave it like this then 🙂

  9. Just a thought, are you going to use an image for “connect with facebook” like you do with Twitter? I’ve seen some other sites do this, thought it could help with some issues?

    Also, when using Google Chrome the “Connect With Facebook” button is underlined like a normal hyperlink, but it’s not on your site here. Any idea’s how I could fix this?

  10. Definately what i was looking for guys!


  11. First of all thanks for great affort 🙂

    İ created a new facebook app and then installed the plugin to my wordpress. But in chrome i get this error :

    Unsafe JavaScript attempt to access frame with URL from frame with URL Domains, protocols and ports must match.

    But it works with firefox. I am using jquery as well. Here is the site :

    Best Regards

  12. i have this problem
    i am using back connect and register plugins.when a new user trys to connect to my site,after login to FB the user is send back to wp-login=register page with the user and email values taken from fb set in teh fields.
    how to i disable this behavior and show the user the regular fb dialog which he need to press allow/not allow -(like in your site)

  13. Hi Otto,

    Could you help me out with a timezone-issue. I am using the Upcoming Events Widget but the start times are displayed 8 hrs ahead. I checked site web and sql server config and these are all ok. Can’t figure out what goes wrong.
    Any help appreciated!!


  14. SFC Comment issue:
    text ‘Connect with Facebook’ shows up, but it is not a button and cannot be used to comment.

    Twitter connect works fine except for the ‘link’ line that is placed underneath the button.

    This actually temporarily worked on my test site, but has now stopped working again – I’m 90% sure I didn’t make any changes. Test site which shows problem: test site

    Bugs in IE
    “Stack Overflow in Line 9” error message pops up – page loads same as it does in Firefox with only Twitter connect button showing.

    Using WP version 3.0.4

    Any suggestions would be greatly appreciated, I’m going around in circles.

  15. I had that issue with the Facebook, check to make sure you have in your footer.php

  16. Ugh, my “Code” tags didn’t work,
    ?php wp_footer(); ? With the “” and the start/end

    • The reason I ask about an update is that currently, SFC is causing a javascript error with a captcha form in a Gravity Form on my site. The error is with SFC-Like and/or SFC-Share. Here’s information from another Gravity Forms user with the same problem:

      Tested all the other SFC modules (that I’d use anyway) and have no problems with them.

      I’m guessing the conflict is NOT with the base Facebook Share/Like button code, but with the way in which Otto implements his “auto insert button” function.

      Will 1.0 solve this?


  17. PLease help…can’t publish to Facebook: Got this message: “If you can see this, then there is some form of problem showing you the Facebook publishing buttons. This may be caused by a plugin conflict or some form of bad javascript on this page. Try reloading or disabling other plugins to find the source of the problem.” Tried reloading and disabling tactic to no avail. PLease help ASAP!! Thanks!

  18. Is there any way to place the avatar on the right side of the comment?
    And possible to enlarge the avatar?

    • left side on the comment, i mean

      • I’m no PHP Guru, but after briefly looking over my comments.php I believe the “avatar” is determined by this line of code
        (I hope that displayed correctly)
        So, I guess give that it’s own class, style it in CSS (floating left) it should sort it (I think)

        • Sorry! That code didn’t work, I always fail at placing PHP in comments. Erm.. Let’s try again 😛

          <?php if(function_exists(‘get_avatar’)) {echo get_avatar($comment, ’32’);} ?>

          • get_avatar doesn’t work for me in the comments. Users with gravatars display properly, but people without gravatars are shown with the default mystery man avatar. I have already edited the last function on sfc-login.php. All I can display is the logged in user’s profile pic on the sidebar, but no go on the comments.

            Any idea?

            Also, SFC comments does not work. The “Connect with Facebook” button shows up as non-clickable text instead the usual button. In fact, it’s the same problem with this site’s comment field as well. I’m using OS X Chrome, if that matters. SFC Login works just fine.

        • If you look at the HTML produced by the page, the avatar already has its own classes. It’ll have “avatar”, “photo”, and “avatar-NUM” where NUM is the size of the avatar.

  19. I think the (gr)avatar alignment is decided in comments.php. However I am not at home to check, I’m sure googling around could solve it, if not I’ll check myself later.

    P.S. Otto, you really need a mobile site!! 😛

  20. Hi Otto,

    Going by your example, I chose to use the /app page as the fan page for my blog. But as you must be knowing, the app page so many limitations. Like the login as page option doesn’t work with pages. Also an app page can’t LIKE other pages.

    I am considering create a new page (just a normal page) and move over. Though my fancy link is already taken up by the app page and I’ll lose existing fans.

    What I want to ask you is, do you have any idea if Facebook might make app pages as good as normal pages?

  21. I just though of a new feature, I’m not too sure if it could work successfully though.
    Could you add a feature to SFC that “posts” on a users wall when a new post is out?
    Perhaps it acts as the admin (FB User) writing on their wall or that user posting it as a status update (via APP NAME)
    Am I making sense?

  22. Just me again.
    Are you going to be adding the new Facebook Comment box? As previewed here –

    I don’t see why you would, as users use Facebook to login. But I’m just curious 🙂

  23. Love what I see so far; looks like you’re doing a fantastic job. Based on what I’ve rad on this page and the main plugin page, I think maybe I should wait until v1.0 to try this. Is that coming soon, or should I just dive in with the current version? Thanks again for your contributions to the WP community!

  24. Awesome. I’ll get on it. You Rock!

  25. I’m having a weird issue. I use the login with ajax plugin and it is showing “Connect with Facebook” in plain text below the password input on the side bar login. I have narrowed it down to it only happening when I have the “SFC – Login” plugin activated.

    Any ideas on how to make that stop?

    • I’m having this problem as well. I’ve gone into the code but I can’t figure out how to fix it for the life of me.

      I did find this: but I’m not sure it’s really what we’re looking for and I’m fearful of installing it given both login with ajax and SFC have been updated since he did this. I’d be more interested in trying to find the changes he made to the code but I don’t know what version of Login with Ajax he used to do a diff.

      This page
      suggests the problem happens with other login widgets as well, suggesting it might be a SFC problem.

      I’ve noticed that if I just drop a “Connect With Facebook” button in as a widget, it appears differently in the site source.

      The widget (working correctly) appears like this in the source:
      Connect with Facebook

      Whereas in the Login with Ajax widget, this is the source that displays the “Connect With Facebook text but fails to pull the button:

      Connect with Facebook

      FB_RequireFeatures([“XFBML”], function() {

      FB.init(“FBKEY”, “”, {“permsToRequestOnConnect”:”email”});


      In both examples, is my wordpress site and FBKEY is my application key.

      It’s pretty clear the FB login button code is not getting into the Login with Ajax widget correctly, but I have no idea how to fix this. I barely know php and the in and outs of wordpress plugins are very much foreign to me.

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Need to post PHP code? Wrap it in [php] and [/php] tags.