As we reported a few days ago the way that Facebook feed stories work is changing to a new system. The new system can be used right away, but the old system will be depreciated (in other words it will stop working) on 20th December 2009.
If you have looked into the new system of feed stories on Facebook it may have left you a little bemused. The example code they give is a little confusing and doesn’t quite work ‘as-is’.
After much experimenting, hitting my head against the proverbial wall and wading through page loads of posts on the developer forum from people who clearly were having similar problems, I came up with some code that works.
Let us look at this example first which requests extended permissions and then posts a feed to a users wall. Extended permissions is the new feature where your application has to ask the user to grant permission to access or post to their wall, send them email, have offline access, send them email, etc.
The good news is that buried deep in the explanations on the Facebook developer site it turns out that there is still a way to simply pop up a request to post a feed to the users wall without the extended permissions but it is not accessible directly from the php library. However I will show you that code in a moment.
If you haven’t already you will need to download the latest facebook php libraries. As always these are downloadable from
http://svn.facebook.com/svnroot/platform/clients/packages/facebook-platform.tar.gz
Here is my modified version of the code which I have turned into a demo that asks you for extended permissions and then posts a sample feed to your wall. You will notice that I only ask for ‘publish stream’ permission since it is all my application needs. I would strongly recommend that you only ask for what is necessary as users are already going to be a little wary of granting permissions so the fewer you ask for the more likely the user is going to accept.
Here is the code: (there is a downloadable zip file with all the code samples at the end of this article).
Facebook announced today that they are changing the way that feeds work. The full facebook announcement can be read in their developer blog at Facebook Development Blog.
Here are the key points in English along with a few questions that the documentation doesn’t do a great job of explaining.
First of all there are now two views a user can have, one is a news feed which is basically posts that a facebook algorithm determines are the most interesting. Things like how many comments, how unique it is and how many people ‘like’ the post will play some part. In their words…
* News Feed will focus on popular content, determined by an algorithm based on interest in that story, including the number of times an item is liked or commented on.
* Live Feed will display all recent stories from a large number of a user’s friends.
OK, so far so good, except you can expect to lose some viral traffic where users only view the news feed and facebook has not flagged your feeds as worthy enough to make it. However according to facebook if these are engaging and interesting then you have nothing to worry about. Of course how interesting anyone can claim ‘Joe Bloggs has made it to level 5 in the big magic spoon game’ is purely subjective.
The biggest concern is that they are depreciating the template feed system by December 20th 2009.
Hundreds of thousands of applications out there all need to be changed in the next two months! And considering the documentation is hard to follow at best they are not making it easy for the little guys. But do not fear! We can break it down into English for you. Read entire article.