Tuesday, 14 July 2009

'Post to Facebook' Wordpress Plugin

post-to-facebook screenshot

After wanting to be able to post stuff to my facebook account from my blog for no other reason than "I Can", I looked around at the plugins that exist at the moment. The ones that I found worked but they were not what I wanted. The closest I got was the plugin Publish To Facebook. What I didn't like about this plugin was that it highjacked the publish/update button. What I wanted was the ability to press a button and publish to facebook for only the posts that choose. So I decided to write my own plugin, that add a button to the edit page to do just this.

The can for the moment the source code can be checked out from bazaar repository, then simply upload the folder to the wp-content/plugins and you're good to go. If you don't like or use bazaar you can download the tar ball.

Download: post-to-facebook.tar.gz

bzr branch http://bzr.yeticode.co.uk/post-to-facebook

14 comments:

  1. Hey John,
    For some reason your plugin doesn't work on my blog. Should I change something, some settings?
    Im using WP 2.8, could that be a reason?

    Cheers
    Karol

    ReplyDelete
  2. What browser are you using? I have only tested it in Firefox 3.5 as I don't have IE installed at the moment. Are you getting any errors?

    The expected result should be is that once the "Post To Facebook" button is pressed it reloads the page with a in browser popup window for the information to post to your facebook account. Is this not appearing or is there no button to press.

    Thanks for the feedback.

    ReplyDelete
  3. Same issue here - no popup appears, all that happens is a screen refresh. Tested on IE7 on Windows, and FireFox on the Mac. WP 2.8.1.

    ReplyDelete
  4. Ok I'm going to have to wait til I get home from work so I can get to a machine with a version of IE. I'll hopefully get it fixed soon. Thanks for the feedback hopefully I can get this sorted.

    ReplyDelete
  5. I've updated WP to 2.8.1 but still same symptoms as Bill's. Screen refresh and that's it.
    Tested on Google Chrome and Firefox, on Vista.

    Thanks

    ReplyDelete
  6. What version of the plugin is it running, I made some changes last night. The current version is 1.0.3, i changed the version so I'm not sure if it will appear as plugin that has been updated. Additionally do you know if you host allows you to use session variables? As without it, it would explain the behaviour your are seeing. I'll try and create a fresh install of wordpress this evening again to try and figure out what the problem is, as I have many plugins that are making it hard to discover why its not working

    ReplyDelete
  7. I've updated the plug in, but still havin problems. Now i get this wornings all over my WP: Warning: session_start() [function.session-start]: open(/home/53712/data/tmp/sess_0b25d1ce1ecd2681560d6bcbbd5d60ac, O_RDWR) failed: No such file or directory (2) in /nfs/c03/h03/mnt/53712/domains/karolbednarczyk.com/html/wp-content/plugins/post-to-facebook/post-to-facebook.php on line 11

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /nfs/c03/h03/mnt/53712/domains/karolbednarczyk.com/html/wp-content/plugins/post-to-facebook/post-to-facebook.php:11) in /nfs/c03/h03/mnt/53712/domains/karolbednarczyk.com/html/wp-content/plugins/post-to-facebook/post-to-facebook.php on line 11

    ReplyDelete
  8. I've just commited an update (1.0.4) so that the plugin does not use session variables. Hopefully this will work. If not I'll keep at it.

    Thanks

    ReplyDelete
  9. Is it updated on WP site? I'm updating through WP Dashboard panel, saves me all login' to servers etc.

    BTW Thanks Johny, for all that work.

    ReplyDelete
  10. Just checked, it works!
    Thanks a lot!

    ReplyDelete
  11. I have multiple bloggers on my site. will the plugin recognize the different people and post to their individual facebook accounts? That is what I would like to do. Or will all things go to the same facebook account regardless of the author?
    Thanks
    Ed

    ReplyDelete
  12. It depends on who is using the blog at the time, as it will use the persons own facebook account. If they do not have an active session with facebook it will ask them to login otherwise it will allow them to submit it directly. So this won't cause a problem unless you are sharing a single computer, or have multiple facebook accounts.

    ReplyDelete
  13. You are in point of truth a fantastic site owner. The website packing pace will be outstanding. It sort of feels you are carrying out any kind of exceptional tip. In addition, The articles tend to be masterwork. you will have completed an outstanding occupation in this issue!

    ReplyDelete