Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Way to override provider? Possible? #45

Closed
mianos opened this issue Apr 12, 2014 · 1 comment
Closed

Way to override provider? Possible? #45

mianos opened this issue Apr 12, 2014 · 1 comment

Comments

@mianos
Copy link

mianos commented Apr 12, 2014

I am using mongo and I don't have the exact same fields as the dict in the facebook plugin:
full_name = profile.get('name', None),
I actually have 'name' and not 'full_name'.

Can I provide my own facebook.py somehow? I could not work out how.
Maybe it's easy. This code from core.py is close but it adds the module path.

        default_module_name = 'flask_social.providers.%s' % suffix
        module_name = config.get('module', default_module_name)
        module = import_module(module_name)

(I could also monkeypatch get_connection_values and put my own facebook to mongo decoder. Not approved. )

@mianos mianos closed this as completed Apr 12, 2014
@eriktaubeneck
Copy link
Collaborator

You closed this, so I'm guessing you figured it out, but the general pattern with Flask-Social (using Mongo or any other data store) would be to match the fields in the existing fields within the providers. All of the providers have the same fields so that the Connection class can abstract the connection to any provider.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants