Wordpress Plugins – Extensions

Just another WordPress.com weblog

Simple Facebook Connect 0.19

Author: Otto
Simple Facebook Connect is a series of plugins that let you add any sort of Facebook Connect functionality you like to a WordPress blog. This lets you have an integrated site without a lot of coding, and still letting you customize it exactly the way you’d like
Installation:

Upload the files to the /wp-content/plugins/simple-facebook-connect/ directory
Activate the plugin through the ‘Plugins’ menu in WordPress

faq:
Whoa, what’s with all these plugins?

The principle behind this plugin is to enable small pieces of Facebook Connect functionality, one at a time.

Thus, you have the base plugin, which does nothing except to enable your site for XFBML and Facebook Connect in general. It’s required by all the other plugins.

Then you have individual plugins, one for each piece of functionality. One for enabling comments, one for adding a share button, etc. These are all smaller and simpler, for the most part, because they don’t have to add all the Facebook Connect stuff that the base plugin adds.

The comments plugin isn’t working!

You have to modify your theme to use the comments plugin.

In your comments.php file (or wherever your comments form is), you need to do the following.

Find the three inputs for the author, email, and url information. They need to have those ID’s on the inputs (author, email, url). This is what the default theme and all standardized themes use, but some may be slightly different. You’ll have to alter them to have these ID’s in that case.
Just before the first input, add this code:
[div id=”comment-user-details”]
[?php do_action(‘alt_comment_login’); ?]

(Replace the []’s with normal html greater/less than signs).

Just below the last input (not the comment text area, just the name/email/url inputs, add this:
[/div]

That will add the necessary pieces to allow the script to work.

Hopefully, a future version of WordPress will make this simpler.

The plugin causes an error with a missing “json_encode”!

I did say that this plugin was for WordPress 2.9 and up.

If you are using PHP 5.2 and up, json_encode is built in. If not, then WordPress 2.9 contains a backwards compatible version of it. Either way, many of the plugins need this function in order to do the Facebook sharing functionality properly.

Instead of defining the function itself, it’s relying on your code already having it available, whether it’s through PHP or WordPress. WordPress 2.8.5 does NOT have this function, so unless you’re running PHP 5.2 or up, many of the add-on plugins will not work with that version of WordPress.

The automatic “share” after the comments looks funky! Or, there’s strange text showing up where it shouldn’t be!

I have encountered other WordPress plugins which mess with the output created by the_excerpt. Since I’m using this to create the content for this piece of the share part, it’s possible that there is another plugin interfering.

To check this, view the source of the single post page. Near the bottom is a fair amount of javascript added by the comments plugin. One section in particular looks like this:
var attachment = {
‘name’:’Name of post’,
‘href’:’http://example.com/blog/2009/post-name/’,
‘description’:”Lorem ipsum dolor sit amet […]”,
‘caption’:'{actor} left a comment on Name of post’,
‘comments_xid’:’http%3A%2F%2Fexample.com%2Fblog%2F2009%2Fpost-name%2F’
};

If it looks messed up in any way, or if there’s any extra text around that area, then you likely have some other plugin that breaks the usage of the_excerpt. You’ll need to find and deactivate that plugin.

The automatic “share” after the comments shows the wrong post!

You have some plugin that is breaking the proper operation of The Loop. A lot of plugins that display some list of posts (like a list of most popular posts in the sidebar, or a recent comments list, etc) have been known to do this. These plugins were written incorrectly and need to be fixed. Look for updates to those plugins.

Note that you must fix these plugins, or remove them. They can cause other issues as well, like comments being attached to the wrong posts and other oddities along those lines. This has been a long standing problem with many WordPress plugins and even some themes. If you cannot find the culprit, try the WordPress support forums. Be prepared to post code from your theme so that somebody can solve the problem for you.

Share doesn’t work, Publish doesn’t work

Check the page source. If you have a message in there that looks like this: “Warning: Cannot modify header information – headers already sent by … in …/wp-includes/class-json.php on line 238”, then you need to upgrade WordPress to 2.9.1. WordPress 2.9 had a minor bug that manifested itself as this error in some cases.

Facebook Avatars look wrong.

Facebook avatars use slightly different code than other avatars. They should style the same, but not all themes will have this working properly, due to various theme designs and such.

However, it is almost always possible to correct this with some simple CSS adjustments. For this reason, they are placed inside a div with an “fbavatar” class, for you to use to style them as you need. Just use .fbavatar in your CSS and add styling rules to correct those specific avatars.

The login plugin won’t let me connect my accounts!

A new security feature in the login plugin is email validation.

When you connect your account to Facebook, the plugin talks to Facebook behind the scenes and attempts to verify your email address. This means that your email on your WordPress account must match one of the email addresses attached to your Facebook account. If the matching process fails, you’ll get an alert box telling you why it failed, and the accounts will not be linked.

This is a very alpha process and I can’t be sure I’ve worked all the bugs out. If you have a problem and you know that your two accounts share the same email address, then email me directly with the problem and I’ll try to help you out and fix the plugin. Please include screenshots of your email address in both WordPress and Facebook to prove you’ve checked that possible problem.

Why does the comment plugin ask everybody to send them email?

The comments plugin, as of version 0.10, asks for the Facebook user’s permission to get their email address. Facebook uses a system called “proxy email”, where it gives an email address back that is not the user’s real email address, but which will forward emails to them. The comments plugin puts this information in the comment’s email field. This is so that when you get the comment notification email, then the Reply-To section will actually work. You’ll be able to reply back to the comment notification and the email will actually get to the user. This also lets plugins like Subscribe to Comments work.

Sometime soon, Facebook is planning on changing their Email API, so this functionality may change or break. The plugin will be kept up to date with any changes Facebook makes, however, the permissions dialog will very likely remain.

To disable this type permissions dialog, disable the option “Require Name and Email” in the WordPress Settings->Discussion screen.

Why can’t I automatically publish to my Application/Fan Page?

Sorry, nothing I can do about it. There’s a bug on Facebook preventing this: http://bugs.developers.facebook.com/show_bug.cgi?id=8184

When they fix it, I’ll turn this feature on. The code is there and done, it just needs to have that bug fixed.

In the meantime, the manual publishing button for an Application or Fan Page works correctly. And automatic publishing of new posts to your personal profile works fine. Note: If you use a multi-user blog, this will publish to the user profile of whoever is publishing the post. That user must also have granted the extended permissions for it to work. Different people may see different settings there, so anybody doing publishing must have granted that permission if they want the post sent to Facebook automatically in any format.

All the email addresses I get from this look like @proxy.facebook.com!

Go to your FB Application, and edit the Settings. On the Advanced Page, there’s a space for “email domain”. Put your domain in there. Having that filled properly will give your users the ability to give you their real email addresses instead of the Facebook proxied ones.

How do I use this Fanbox custom CSS option?

Well, first you have to learn CSS.

Next, try starting with this code in the custom CSS box:
.connect_widget .connect_widget_facebook_logo_menubar {}
.fan_box .full_widget .connect_top {}
.fan_box .full_widget .page_stream {}
.fan_box .full_widget .connections {}

That should be enough to get you started.

The publish code doesn’t process the NextGen gallery shortcodes!

Well, actually, the publish code would process those shortcodes, if NextGen Gallery wasn’t trying to be so bloody clever.

There’s a bit of code in nggallery.php that looks like this:
// Load backend libraries
if ( is_admin() ) {
require_once (dirname (FILE) . ‘/admin/admin.php’);
require_once (dirname (FILE) . ‘/admin/media-upload.php’);
$this->nggAdminPanel = new nggAdminPanel();
// Load frontend libraries
} else {
require_once (dirname (FILE) . ‘/lib/navigation.php’);
require_once (dirname (FILE) . ‘/nggfunctions.php’);
require_once (dirname (FILE) . ‘/lib/shortcodes.php’);
}

Notice that it doesn’t load the shortcodes.php file in the admin sections? That’s why those shortcodes don’t get processed. Copy that shortcodes line up into the is_admin section too and it should work now.

Simple Facebook Connect 0.19

Advertisements

April 30, 2010 - Posted by | download, extension, extensions, free, get, internet, plugin, plugins, Uncategorized, wordpress

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: