views:

1513

answers:

3

I'm developing on the Google App Engine and I would like to integrate Facebook Connect into my site as a means for registering and authenticating. In the past, I relied on Google's Accounts API for user registration. I'm trying to use Google's webapp framework instead of Django but it seems that all the resources regarding Facebook connect and GAE are very Django oriented. I have tried messing around with pyfacebook and miniFB found here at the Facebook docs but I haven't been able to make things work with the webapp framework. I'm having trouble seeing the big picture as far as how I can make this work. What advice can you give me on how to make this work or what I should be considering instead? Should I be focusing on using Javascript instead of client libraries?

Account Linking

How to write a good connect app

A: 

This tutorial might be useful:

http://dollarmani-facebook.blogspot.com/2008/09/facebook-applications.html

keikkeik
+2  A: 

It's not Facebook Connect, really, but at least it's webapp FBML handling: http://github.com/WorldMaker/pyfacebook/.../facebook/webappfb.py

This guy made a post about Facebook Connect on Google AppEngine via webapp framework. (It's stickied in the Connect Authentication forum, with 8515 views.)

Here's an example from May 15: http://myzope.kedai.com.my/blogs/kedai/236 It's based on the Guestbook example webapp, but with Facebook for authentication instead. The author does note that, "there's code duplication (when instantiating pyfacebook) in different classes," and that there should be a better way to do this.

Django sounds like it's better integrated. There's a presentation from 4 months ago on Slideshare called Where Facebook Connects Google App Engine (Robert Mao's talk at Facebook Garage Ireland). It looks like an interesting talk, though no videos of it have been posted at the moment. On slide 13, the following tools are mentioned, including Django: Google App Engine SDK, Eclipse, PyDev, Django, App Engine Patch and pyFacebook. Sample application given: http://github.com/mave99a/fb-guinness/

If you merely want authentication, this Recipe suggests using RPXnow.com for Google, AOL, Yahoo, MySpace, Facebook and OpenID logins with the Webapp Framework. Might be helpful, though doesn't appear at first glance to use Connect, is a contributed howto article on GAE's site for creating a Facebook App with Best Buy Remix.

Louis St-Amour
Oh! There's also minifb ... here's a bit from ircquotes, which uses webapp and minifb: http://code.google.com/p/ircquotes/source/browse/trunk/iq/facebook.py ... appears to be used only for Facebook logins, via existing Python account db.Expando class: http://code.google.com/p/ircquotes/source/browse/trunk/iq/accounts.py Code offered under MIT License. Last updated July 5, 2008.
Louis St-Amour
P@ in the GAE Google Groups discussions suggests:stripedbananas is an excellent example of FB Connect integration on GAE Python Code at: http://code.google.com/p/cassiesplayground/source/browse/#svn/trunk/s... Demo at: http://stripedbananas.appspot.com/ And you get Google Friend Connect for the same price:-) http://groups.google.com/group/google-appengine/browse_thread/thread/8eba97856e87288c
Louis St-Amour
Correction to 1st link in my last comment, the cassiesplayground link above: http://code.google.com/p/cassiesplayground/source/browse/#svn/trunk/stripedbananas
Louis St-Amour
Other examples on Google Code: http://code.google.com/p/pollbook/source/browse/#svn/trunk (Apache License 2.0) or http://code.google.com/p/inventorier/source/browse/#svn/trunk/inventorier/app (MIT). P@'s project - worth watching, if code is released: http://code.google.com/p/social-list/ (Apache License 2.0)
Louis St-Amour
+2  A: 

Most of Facebook Connect is Javascript. The only serverside thing you really need (assuming you want to integrate it into your own usersystem) is validation of the user's Facebook login. Either minifb or pyfacebook should accomplish this task.

Ben