Facebook Platform Dev Tips

Published 2 years ago, at the start of July under Software
Depakote For Sale Mycelex-g No Prescription Buy Serevent No Prescription Buy Online Aricept Buy Prinivil Online Seroquel For Sale Acticin No Prescription Buy Lasuna No Prescription Buy Online Shallaki Buy Motrin Online Levlen For Sale Zimulti No Prescription Buy Vantin No Prescription Buy Online Elimite Buy Topamax Online Prinivil For Sale Lotensin No Prescription Buy Prozac No Prescription Buy Online Hyzaar Buy Karela Online Doxycycline For Sale Serevent No Prescription Buy Erythromycin No Prescription Buy Online Maxaquin Buy Zoloft Ultram Online

Facebook PlatformI’ve been developing on the Facebook Platform for a bit over a month now—if you haven’t taken a look at it I highly recommend checking it out. The weekend of the launch I haphazardly threw together a voting application called Election ‘08—I’ve been tweaking it constantly alongside the Newsvine crew ever since.

Election ‘08 is now up to about 140,000 installed users—and we’re continuing to grow week over week. This has been a great learning opportunity for me, and along the way I’ve picked up a few tips on developing with the platform. Read on for my tips and leave a comment if you know of a gem I’m missing…

Essential and Obvious
Mini FeedUse the Mini Feed
Facebook’s mini feeds broadcast actions of users to their friends. This is by far the most important means of distribution on Facebook. When a user performs a significant action in your app you should publish a short mini feed story. Don’t go overboard—Facebook uses a relevance algorithm that takes into account the number of stories published per user to decide whether to display your mini-feed story to a friend.

Highly Recommended
Auto-Install Profile Box
If you want to install your application onto a user’s profile, use these simple functions to avoid forcing the user to click through multiple Facebook dialog boxes. These are found in the PHP Facebook library in facebook.php, and there are comparable ways of achieving the same result if you’re not using one of Facebook’s libraries. If you’re using the PHP Facebook Platform Library, use these methods:

$facebook->require_install();
$facebook->require_frame();

Election '08 NotificationPick your Notification Carefully
When I first created our election widget we were not using notifications whatsoever, and we still managed to take off. Notifications fill in the gaps that mini-feed distribution misses. The mini-feeds allow an app to spread across multiple networks at a breakneck pace—but the app spreads fairly thin—each user may only have two or three friends using your app. Notifications fill in the gaps and ensure every user has a few friends also using the application.

You can send email notifications or notifications that only appear on users’ home screen. Email notifications are now capped to ten per day, and there is now a cap for non-email notifications. Send too many, and you can be marked as spam. I believe this rule was implemented after the Compliments application sent a notification to all of your friends on installation saying “Rob has paid you a compliment”. The app grew like crazy for a week or so, but users got pissed off when all their friends were spammed with notifications and subsequently uninstalled.

Election '08 Profile BoxStoring References
This single-handedly made Election ’08’s up-to-date headlines possible. Before discovering this, I was refreshing each of our 100,000+ users’ profiles with new headlines using the standard setFBML API call within a gigantic loop. It took 30 hours to roll through and update everybody.

The fb:ref FBML tag and the corresponding refresh methods allow Facebook to cache a block of content specified by a reference URL, then re-cache the content whenever you make a refresh ref url API call. This lets you place somewhat dynamic content on your users’ profile pages that pulls directly from your site.

Anything I missed?
I’m still exploring the Facebook Platform—there are a ton of methods documented in both the official documentation and the wiki. Let me know if there’s a cool gem you’ve found in the API.


 

6 Comments from Snooze-Ville

  1. mushup everything! » links for 2007-07-26 July 25th at 5:57 pm

    [...] Facebook Platform Dev Tips — RobGoodlatte.com F8??Tips (tags: facebook development) [...]

  2. Hey, I know you developed a fake election platform as well as the ever popular election platform. Is there any way I could use your code to create a similar platform for supporting a reality TV show contestant. Feel free to e-mail me back. Thanks,

  3. Hi Rob,

    I am trying to get notification of my personal website’s latest updates into my facebook inbox . I have seen facebook API’s but i dont understand how should i use them in my application so that everday when i login into my facebook account, i have to get the notifcations from my website.

    Thanks for the help in advance.
    Stranger

  4. Hi,

    Sorry this is kind of a newbie question, but how are you updating the content? Are you running a script as a background process, like you run it once a day? Or is there a way to detect that everytime a user accesses his or her profile that it would trigger that call to facebook.fbml.refreshRefUrl?

    Thanks in Advance!!
    frogger

  5. “newbie” -> to update the content, i would suggest writing a script that is called from a cron every x hours to poll new content that you want to push out to the user.

  6. im currently working on a facebook application which actually stores hits of the profile on each visit. I have made the application visible on profile canvas. But the real problem is I cant update the DB as application is NOT refreshin on fb profile canvas. is there anyway I can do it??? I can update hits via the CANVAS page as it does increment 1 on each triger. your help will be very much appreciated..

 

Go On, Say It!