Progress on the new SFC continues. Added a new plugin to it this morning: Photos. It’s a simple little plugin, and not pretty yet, but it does work.
Here’s a couple of example screenshots:
The selection screen (not pretty, but functional)
Example of the result
The plugin itself turns out actually to be quite simple. It turns out that adding to the media tabs is fairly straightforward with the existing WordPress functionality, and making links that insert things into the post code is not nearly as difficult as I thought it might be.
You can use the SFC beta version if you like. There’s a copy in the WordPress SVN directories. However, it’s buggy and unfinished and doesn’t have all the same functionality. But most of it works okay. Still needs polish before releasing it.
Note that all development on the old SFC 0.25 has ceased. I’m not making any further patches to it. If you want to upgrade now to the 0.999 beta version, feel free. Also, patches welcome.
One picture that sums it up for me is the Insights functionality Facebook can give you:
Facebook Insights Page for ottopress.com
That’s not for my app on Facebook, that’s for clicks on Like/Share buttons on this site, right here. You can drill down further and get clickthrough ratios, likes for individual pages, etc… Along with a whole bunch of other detailed information.
Because the “site” is separate from the “App”, I can get similar stats for likes on my Facebook Page (really an app) and such too.
BTW, if you’re using SFC and haven’t enabled this sort of thing, then it’s really easy to do. You can do the same thing without SFC, it’s just that SFC makes it easy for you by putting all the proper header codes into your page to make it work seamlessly.
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.
I’m about half done with this, and just wanted to give an update to those people I know who are awaiting it.
I’m ditching the multiple-plugin thing. Too many complaints and too much confusion. Also, the plugin directory and updaters don’t support it well. So 1.0 will have a checkbox area where you can select the pieces you want instead.
Login works. Register needs some more work.
Automatic publishing now works for both Fan Pages and Applications! I just worked out how to make Application posts through the Graph API properly. Manual publishing isn’t quite there yet.
Widgets are largely unchanged, but will all be rolled into one sub-module.
Fan box got replaced by the Like box, which is the same thing with a different name. So I’m going to keep calling it the Fan Box in the interface.
The bookmark widget is going away, because it doesn’t work properly anymore anyway.
New widgets for the Facebook Social Plugins are working.
Like and Share will remain unchanged, although the Like now uses the XFBML to do its thing. Doesn’t really make a whole heck of a lot of difference, though.
Comments pull-back from Facebook is possible. I know how to do it. I’m debating whether or not to turn them into “full-fledged” comments or just display them separately.
Comments push *to* Facebook is also possible. Meaning that if somebody leaves a comment using FB and clicks the share checkbox, it will send it to Facebook (no popup) and also include the text of their comment (or an excerpt, at least). This is not done yet, but it’s actually quite easy to add now.
All dependence on the FB-Connect library will be gone. Ditto for their PHP library. I’m writing this with pure calls to the Graph API and XFBML. PHP 5 is still required, and there’s still an activation check for that.
One last thing: Upgrading from old versions to the new one will be a hassle. Things will just stop working properly when you upgrade. Can’t be helped. So I recommend deactivating SFC and all sub-plugins entirely before upgrading, then reactivating it afterwards. There will be a note to this effect on the WP plugins screen.
Update: Since writing this, Facebook has altered the look of the Application Settings page. Now there’s only two major settings that you need to set, and they’re both on the Web Site tab: The Site URL and the Site Domain. Set those correctly and your App will work with SFC. Set them incorrectly, and it will not. So, much simpler, really.
The majority of the email I get from users of the Simple Facebook Connect plugin is questions regarding how to setup their Facebook Application. It’s really not that hard to do, but the plethora of options can seem somewhat intimidating. So here’s the basics of what you need to do.
After creating your application, you’ll need to visit the Apps section in the Facebook Developer Home area. Here you’ll find your application, and the all critical “Edit Settings” link.
Firstly, never give out your Application Secret. If you give this out by accident, then use the Reset Secret Key link to get a new one.
Anyway, from here, you want to go into the settings. The settings area is divided into six main sections, but most of the settings are irrelevant. See, you’re building a “Connect” application, not a “Canvas” one. So most of these are meaningless for you. The following ones are what you actually care about:
Obviously, you want the name of your Application to make sense. I suggest using the same name as your website. You can even use your domain name here if you like. Just be aware that this name is what the Fans of your site will see in their Applications area.
The Basic Information section is important as well, fill it in as you see fit. I also recommend uploading good icons and/or logos for your site. Gives it that finished look.
Contact Information is obviously important as well, but don’t worry about all those extra URLs. They really apply more to Canvas apps. Of course, if you want to make special pages on your site for them and provide the URLs here, feel free.
The Authentication Settings page is surprisingly important. Those top two boxes need to be unchecked for a Facebook Connect application. Why? Because when they are unchecked, your Application becomes an “External Website” as far as Facebook is concerned. If you have either them checked, then your app’s Canvas section becomes active and you might have users trying to add it to their profiles and such, resulting in broken pages and a general bad user experience.
The Connect Settings page is probably the most important one. These settings must be filled in and they must be absolutely accurate. Specifically, the URLs must be the URLs that are actually used by your site. Capitalization matters. The leading “www” or lack of one matters. Whatever the URL your site is in the browser is what you MUST put into these fields. Anything less and your site will not work.
The Advanced Settings screen contains these three fields which you need to set in the same way I did. The email domain no longer exists, however. They removed that in favor of a different approach, so you can ignore that field.
Finally, after you have saved those settings, take the time to go back to the main application screen and click the “Edit Application Profile” link. You’ll be taken here, where you can set up the “look” of your application page on Facebook. This includes what tabs are visible, the stuff in the Info section, etc. You can add extra Applications tabs to this page and generally customize all sorts of stuff. None of that affects your site, but it does affect how the App Page looks in Facebook. The more polished it is, the more likely people will “Fan” your Application. And Fans get updates from when you publish posts to the Wall. Great way to drive traffic to your content.
Hope this helps! Mainly, I hope this reduces the number of questions I get about this process. Enjoy SFC!
I sort of snuck this into Simple Facebook Connect 0.18 for you all.
If you go to http://facebook.com/insights, then one of the new things they have is “Insights for your Domain”. Basically, this lets you hook the Facebook Insights system up to your own domain.
They give you meta info to add to your site so as to define who has control over that site. This lets them know who should be able to see the insights and such.
Well, if you use SFC, that information is already there for you. Just go over to the insights page, put in your domain, then “Link With” your SFC Application. No need to add anything else to your site, the base SFC plugin is adding that fb:app-id meta tag for you automatically (once you’ve configured SFC itself, of course).
Note that you may have to link it a few times before it actually takes. Facebook has to retrieve your webpage to verify the connection, and it seems to time out rather easily. Took me several tries and I kept getting messages like “Bad Domain” and such. But it finally worked.
Since I just added it, I don’t have any data yet to show you, but basically it will keep track of the “Shares” from your site, so those Share buttons will now give you some useful information and feedback on the Insights page.
Additional: Note that since I wrote this post, Insights never actually updated or worked at all. Facebook basically dropped the ball and never actually finished this code or turned it on or something. I seriously wonder exactly WTF they are doing over there sometimes. Anyway, here’s the bug if you want to track it: http://bugs.developers.facebook.com/show_bug.cgi?id=10174