I found some code on http://codepad.org/tadGosTd

I want to know if below piece of code is sufficient for creating a
record in auth.user table and creating a session for a user connected
using facebook connect?

        logged_user = Users.find_by_fb_id(user['uid'])
        user_id = db.users.insert(fb_id=user['uid'], name=user['name'],
age=user['age']) if not len(logged_user) else logged_user[0].id

        if not auth.is_logged_in():
                user_obj = 
Storage(the_data._filter_fields(Users.find_by_id(user_id)
[0], id=True))
                session.auth = Storage(user=user_obj, last_visit=request.now,
expiration=2600)
                auth.user = user_obj


On Apr 20, 10:10 am, howesc <how...@umich.edu> wrote:
> Rohan,
>
> Someone pointed out gaema (http://code.google.com/p/gaema/) on the
> group a couple of weeks ago as a tool that integrates google, twitter,
> facebook, and others with google app engine.  i'm in the process of
> adapting it to work with web2py auth (for GAE and non GAE apps).  If
> all goes well look for an update from me in the next day or two with
> my progress.
>
> christian
>
> On Apr 19, 12:17 am, Rohan <yourbuddyro...@gmail.com> wrote:
>
>
>
> > Hi All,
>
> > I want to use fbconnect with web2py. I found couple of threads in this
> > group
> > 1.http://groups.google.com/group/web2py/browse_frm/thread/84f27e0a06312...
> > 2.http://groups.google.com/group/web2py/browse_frm/thread/31e9149ad7310...
>
> > but I am not able to find any document to get started with using
> > fbconnect with web2py. I have already obtained API key from facebook.
> > Can someone please share any doc for using fbconnect with web2py?
>
> > Thanks

Reply via email to