SFC Updates
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.
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.
I know how to do it using the Graph API and I have proof of concept code that can get comments. Haven’t tried to put them into WP yet, or attempted to write synchronization code.
Hey Otto,
Is there a reason why my Admin area’s “incoming links” section are suddenly full of URLs like this?
http://facebook.com/extern/login_status.php?api_key=……
Something broken? I did update it to .24 today.
No… nothing to do with me. I don’t see that in my incoming links area. Check Google, that’s where those incoming links come from.
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.
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?
Enable the SFC-Register plugin. Also, enable your site to allow users to register.
Thanks for your quick support, the registration to the site was disabled by default. Now, it is working. I would like to skip the registration page – simply, it does not look good. I have two plugins installed: AJAX Login Widget++ and Register Plus Redux. I think I can use one of them to simplify the registration process and after pulling the data from facebook just send it to the php even without loading the register page. Do you have a quick solution to that, or should I dig trough and mess with the code?
Tnanks in advance!
Add this to your wp-config.php file:
define ('SFC_REGISTER_TRANSPARENT', true);
No guarantees that it works.
Definitely what I was needed. Thank you!
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.
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 ? http://developers.facebook.com/docs/reference/plugins/comments
– and what about the “recommendations” one ?
– Do you know if this http://wordpress.org/extend/plugins/sfce-create-event/ might be merged into yours ?
Thanks, and reaaaaally looking forward version 1.0 !
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.
thanks.
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.
Thanks for your insights. We’ll leave it like this then π
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?
Oh, also are you going to support XFBML?
If I use a “like” button manually I have to use the iFrame method. XFBML doesn’t show at all
1.0 will use XFBML for the like button, yes. However, the Like button is converted to the iframe version in the DOM by their javascript anyway, so there is no functional difference between the two methods.
But XFBML auto-resizes? (Correct). This is a feature I could find useful π
Definately what i was looking for guys!
thanksssss
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 http://magazin.websiteci.com/ccc/#share from frame with URL http://www.facebook.com/extern/login_status.php?api_key=88842415decc15d87d90a361663d3ce7&extern=2&channel=http%3A%2F%2Fmagazin.websiteci.com%2F%3Fxd_receiver%3D1&locale=en_US. Domains, protocols and ports must match.
But it works with firefox. I am using jquery as well. Here is the site : http://magazin.websiteci.com/ccc/
Best Regards
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)
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!!
Thijs
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.
I had that issue with the Facebook, check to make sure you have
in your footer.php
Ugh, my “Code” tags didn’t work,
?php wp_footer(); ? With the “” and the start/end
I have this tag in my footer.php doc
Is this correct, or is it supposed to have “” (speech marks) at the start and end?
Cheers
I didn’t know there was a PHP tag. I feel like a noob π
Yeah, that should work how it is, before the body tag.
But I still had issues with it in IE9
Any update on 1.0?
Thanks
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?
Thanks,
Daisy
Any update on 1.0?
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!
Are there any other Facebook Related plugins that are not SFC?
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.
There’s nothing wrong with the comment form on this site. Something is wrong with your browser.
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.
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!! π
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?
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?
Just me again.
Are you going to be adding the new Facebook Comment box? As previewed here – https://developers.facebook.com/blog/post/472
I don’t see why you would, as users use Facebook to login. But I’m just curious π
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!
I’d dive in now. 1.0 ain’t happening soon. π
Thanks for the prompt reply. Due to SFC not using the new facebook js, what features/functionality (if any) would I be missing by using the plugin versus applying the code/tools provided on http://developers.facebook.com/docs/plugins/?
None, really. The new JS stuff still isn’t quite as capable as the old stuff was. Some of the new XFBML doesn’t work with the old stuff, but there’s iframe equivalents, and anyway they’re trying to phase out XFBML.
Awesome. I’ll get on it. You Rock!
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: http://erikshosting.com/projects/facebook-connect-ajax-login-wordpress/ 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 http://wordpress.org/support/topic/simple-facebook-connect-extra-text-with-any-login-form-widget
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”, “http://website.com/?xd_receiver=1”, {“permsToRequestOnConnect”:”email”});
});
In both examples, website.com 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.