On Wed, Jun 20, 2012 at 7:49 AM, Michele Comitini
<[email protected]> wrote:
> You don't return a dictionary with the registration_id key in the
> get_user() method.
>
> change the code as follows:
>
>  return dict(first_name = user['first_name'], last_name =
> user['last_name'], username = user['id'], registration_id =
> user['id'])
>
> This is stated in the web2py book as required parameter when using
> third party authentication.
>
> mic

Thanks, that worked.

I guess I was reading the wrong book... I got the previous snippet
from the "web2py Application Development Cookbook".

> 2012/6/16 Alec Taylor <[email protected]>:
>> Unfortunately I haven't been able to get Facebook login with OAuth2 working.
>>
>> I've created a tiny test-case below with the problem.
>>
>> The only major changes I have made is to models/db.py with a minor
>> function (foobar) in controllers/default.py.
>>
>> https://gist.github.com/9967cb95fe026890dae7
>>
>> I have placed the facebook.py file in the modules folder and the
>> CLIENT_ID and CLIENT_SECRET in another .py file in my modules
>> directory [file starts with `from gluon import *`].
>>
>> Please tell me how I can get this to work.
>>
>> Thanks for all suggestions,
>>
>> Alec Taylor
>>
>> FYI: Not showing a ticket because it actually is stuck in an infinite
>> loop. However when I take out the `@auth.requires_login()` decorator
>> before the `foobar` function the page loads, but "Login" still appears
>> in the top-right.

Reply via email to