James Andrews

Tag: wordbook

A Facebook Wordpress app of my own….

by jandrews on Mar.27, 2009, under Web Development

For the last few days I have been frustrated that I could not get my blog posts to show up in the feed on the Facebook “Home” page. I have tried a half dozen WP plugins, some required me to create a Facebook app, others required me to use their Facebook app, an just give permission to do things. The most common of these is WordBook, there are 2 the one with the most users is the one I got to function. The problem is it doesn’t function the way I want, and this is because of Facebooks recent UI change. Now the UI change doesn’t bother me like it bothers so many others, but it still left me without a way to automatically advertise my blog posts in Facebook without manually having to post the link there myself.

Frustrated I took things into my own hands. I started last night. I created the framework for a Wordpress plugin. I got it to do some basic things. Like write post I just created to the file system. I didn’t need to go that far, I only needed the post ID, but at least I knew I could get the post data.

Next was Facebook. I liked how Wordbook handled it, but I wasn’t sure if anything was done on some server somewhere. Through trial and error I figured out what the author was doing, and did something similar. Wordbook is actually more complex than what I need it to be. I don’t plan on having a bunch of users bloggin my blog. Just me, so I only need it to talk to my Facebook account. The Facebook php libraries don’t have a call for links_post which is a beta function. Alas this is what I needed. What I did was I created a class called FacebookExtended and did just that. Extended the FacebookRestClient. Added the 1 function I needed based on their API. After a few hours I have my first WordPress plugin started (I may add more functionality to it or I may not), and I have done something more complex with Facebook apps than my previous toying around.

Either way. This post is the first to hit Facebook using my plugin. Go me!

4 Comments :, , , , , more...

WordBook Plugin

by jandrews on Mar.26, 2009, under PHP Development

One of my goals is to be able to advertise my Blog over Facebook. The most popular of the Facebook wordpress plugins is “WordBook”. I have it installed and indeed when I publish a blog post it shows up as a “recent action” link on my profile page. Not exactly what I want to happen. and survey says [X] I want to be able to have it show up in my new feed. No problem I say. I can hack anything ANYTHING, ok well maybe not anything, but I can hack PHP until my heart is content, or until I hit a brick wall I can do nothing about. I backed up my copy of WordBook, and started poking around the code. Once I figured out where it was calling Facebook’s client library, I saw what call it was making. Should be simple right? and survey says [X][X]. In order to post a link to your feed, which is what I was trying to do, you need to call facebook.links.set(…) which is not part of the current php library that facebook has published. No biggie. I understand what the library is doing, so I make a function similar to the one above but with only the attributes I need. It calls facebook, and survey says [X][X][X]. See in order to call facebook.links.set the user has to have granted the Wordbook application running on facebook access to a new kind of permission. Since the Wordbook developer has not done any work on his end to include this new feature I am how do we say. Shit out of luck.

Leave a Comment :, , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...