socialite-odnoklassniki
socialite-odnoklassniki copied to clipboard
Add support for `::fields()` method
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?
@mityukov feel free to make a pull request with this feature.