Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ::fields() method #14

Open
mityukov opened this issue Jul 5, 2019 · 1 comment
Open

Add support for ::fields() method #14

mityukov opened this issue Jul 5, 2019 · 1 comment

Comments

@mityukov
Copy link

mityukov commented Jul 5, 2019

There is an option to request specific set of "user fields", when working wit some of other providers.

Example:

$fbUser = Socialite::with('facebook')
            ->fields([ 'id', 'name', 'email', 'picture' ])
            ->user();

$vkUser = $user = Socialite::with('vkontakte')
            ->fields([ 'photo_50', 'email' ])
            ->user();

With this provider, however, this method doesn't work:

$okUser = Socialite::with('odnoklassniki')
            ->fields([ 'uid', 'name', 'pic50x50', 'email', 'url_profile' ])
            ->user();

The error message I get:

Call to undefined method JhaoDa\SocialiteProviders\Odnoklassniki\Provider::fields()

Is t possible to add ::fields() support here?

@jhaoda
Copy link
Owner

jhaoda commented Jul 5, 2019

@mityukov feel free to make a pull request with this feature.

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

No branches or pull requests

2 participants