oauth2 is an unfortunate name chosen for a module that actually implements oauth1.0a: see https://pypi.python.org/pypi/oauth2
About the error check that you have installed the above package on your system. You can do so in a python shell: $ python >>> import oauth2 >>> consumer = oauth2.Consumer >>> print consumer 2013/12/21 Luciano Laporta Podazza <lucianopoda...@gmail.com> > Hello, > > I've been trying to integrate Facebook/Twitter login with > Web2py 2.8.2-stable and OAuth2(the built-in oauth20_account.py) using this > example: > > https://groups.google.com/forum/#!topic/web2py/S9ukjWz6qMA > > Facebook login works but when I try the Twitter example I get this > traceback: > > Traceback (most recent call last): > File "/Users/keniobats/Downloads/web2py/gluon/restricted.py", line 217, in > restricted > exec ccode in environment > File > "/Users/keniobats/Downloads/web2py/applications/dugnading/models/db.py" > <http://localhost:8000/admin/default/edit/dugnading/models/db.py>, line 167, > in <module> > twitter_login = TwitterAccount(globals()) > File > "/Users/keniobats/Downloads/web2py/applications/dugnading/models/db.py" > <http://localhost:8000/admin/default/edit/dugnading/models/db.py>, line 155, > in __init__ > self.ACCESS_TOKEN_URL) > File > "/Users/keniobats/Downloads/web2py/gluon/contrib/login_methods/oauth10a_account.py", > line 125, in __init__ > self.consumer = oauth.Consumer(self.client_id, self.client_secret) > AttributeError: 'module' object has no attribute 'Consumer' > > I've tried including the oauth2 module in web2py/sites-package and > myapp/modules and still get the same error. > Also, I don't know why in the twitter example oauth2 is imported if > Twitter is supposed to use oauth 1.0: > import oauth2 as oauth > > I love web2py but i'm still a newbie. Any help will be appreciated. > > Thanks in advance. > > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.