facebook oauth support

23 views
Skip to first unread message

mcm

unread,
Jun 28, 2010, 4:12:17 PM6/28/10
to web2py-users
Hi Massimo, hi All,

A first release of support for facebook authentication through
facebook OAuth service with Graph API
is available on the following git clone:

https://code.google.com/r/michelecomitini-facebookaccess/source/browse/gluon/contrib/login_methods/facebook_account.py
I put some instructions inside the code itself so please read the
code!

Usage requires the facebook Graph API supporiting module (also called
python-sdk) available here:
http://github.com/facebook/python-sdk. The only required file is
facebook.py.

I advise you that code is still immature, but I hope you can find it
usable.

tnx
michele

Kuba Kucharski

unread,
Jun 29, 2010, 5:13:25 PM6/29/10
to web...@googlegroups.com
hi, MCM

the web2py community is very much interested in facebook graphApi
intergration with web2py, can you make it plugin/model?
I use some graph api calls in my applications but it is simple token
exchange, no integration with app. but I know the subject, maybe I can
help.

thx for all your efforts


--
Kuba

howesc

unread,
Jun 29, 2010, 5:29:10 PM6/29/10
to web2py-users
there is also this:
http://web2pyslices.com/main/slices/take_slice/77

still not a plugin exactly, but it supports multiple authentication
types.

Kuba Kucharski

unread,
Jun 29, 2010, 5:45:21 PM6/29/10
to web...@googlegroups.com
hey, howesc

If you could provide working application package w/o facebook keys of
course it would be neat because I did not manage to get your slice
fully working.

--
Kuba

Kuba Kucharski

unread,
Jun 29, 2010, 5:46:35 PM6/29/10
to web...@googlegroups.com
ok, maybe howesc!=cfhowes, sory ;) I thought it is yours.

--
Kuba

Michele Comitini

unread,
Jun 30, 2010, 5:16:21 PM6/30/10
to web...@googlegroups.com
Hi Kuba!

The code does only authentication.  The graph API is used at the moment to get
the "me" node and only that, so that user info from facebook becomes available under
auth.user.

About the model I think that the usage of the graph API is straightforward and similar to any other graph API or library.
RDFlib (www.rdflib.net) is an example.  The model is just a node.
Since vertices are a properties of the node, reaching any information
in the graph is just a matter of node recursion.  This kind of model works well with
REST, where resources are nodes, urls are the sequence of vertices to reach a node.
This approach is generic gives you the most of flexibility and implementing the model in web2py is
as simple as instantiating the start node.

As soon as the example app will be usable I will post it.

tnx
michele

2010/6/29 Kuba Kucharski <kuba.ku...@gmail.com>
Reply all
Reply to author
Forward
0 new messages