Share on Facebook Updated
In the last week I’ve released 2 updates to the Share on Facebook plugin.
The first update, released last week, addresses functionality that several people had requested. Users wanted the ability to designate if the share should appear on posts, pages or both. So I added an option called Page Type that does just that.
The second, released earlier today, works around the issue I’ve gotten the most emails about for this plugin. Many people have gotten an error as follows:
fatal error
Parse error: parse error, unexpected T_OBJECT_OPERATOR in…/blog/wp-content/plugins/share-on-facebook/shareonfacebook.php on line 32
I collected enough information from those who emailed to see that this was only happening when PHP 4.x was being used so my standard reply to the issue was to ask your sys admin/service provider to upgrade PHP to the latest version. I realize that it’s kind of silly to risk any incompatibility issues that could occur with a PHP upgrade just to get a small plugin working but that was my standard answer because I simply had no other solution.
Last week I got an email from someone who had a solution. After discussing the issue and learning why the fix works (really why the code I had was wrong) I implemented the fix and released it earlier today.
Current users should be prompted to upgrade to the latest version, 1.5, today. New users should not see the error above. Everybody wins.
Enjoy.
Follow me on Twitter: golddave.
ShareRelated Posts
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.
Comments
Charlie -
Thanks for the comment. I think you posted this on the wrong page. Seems like you’re talking about “Publish to Facebook” which can be found here. The problem you’re commenting on is a WordPress issue. The only way I have found to inject the Facebook function in the posting process is to use a redirect function that send your browser to the Facebook page. I’m looking into other ways to do it when I have time.
- Dave


Not a big fan of the redirect for the posting to FB. Would be nice if I could stay on my blog after clicking to publish or update. The redirect is a little unexpected the first time. Maybe a Javascript pop-up could be better?
Decent plugin though. Definitely going to continue to use it.