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:
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", line 167, in <module>
twitter_login = TwitterAccount(globals())
File "/Users/keniobats/Downloads/web2py/applications/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.
Note: I don't want to use Janrain, indeed i'm looking for Facebook/Twitter/Regular login form auth.