Giter Site home page Giter Site logo

Comments (6)

adamwathan avatar adamwathan commented on August 18, 2024

Try $details->raw('timezone'). If it's available using the scopes that are setup, it should come back there.

It won't come back as part of the standardized response because not all social providers will include that and part of the goal of the package is to normalize the data across providers.

from eloquent-oauth-l5.

BrendanTWhite avatar BrendanTWhite commented on August 18, 2024

Hi Adam, thanks for getting back to me so quick.

I tried that but it doesn't seem to be there. So I did var_dump($details) and it gave me:
no_timezone

...so I guess it's not there. I'll go dig deeper, and if I find anything I'll post back.

from eloquent-oauth-l5.

BrendanTWhite avatar BrendanTWhite commented on August 18, 2024

Looks like it's the $fields array in lines 14-17 of socialnorm-facebook/src/FacebookProvider.php that controls this. When I add 'timezone' to this array, I get the timezone in $details->raw.
with_tz

I'll post something in socialnorm.

Thanks again,
B.

from eloquent-oauth-l5.

adamwathan avatar adamwathan commented on August 18, 2024

Ah makes sense!

You could easily extend the default Facebook provider and replace that fields array with your own, then just register your Facebook provider using this method: https://github.com/adamwathan/eloquent-oauth/blob/master/src/OAuthManager.php#L27-L30

Just register it under the facebook key and it'll override the one that's registered by default. I think if you put it in your AppServiceProvider it'll get registered last and definitely override the existing registration.

Would be nice to make the Facebook provider more configurable out of the box but this should help in the mean time.

from eloquent-oauth-l5.

BrendanTWhite avatar BrendanTWhite commented on August 18, 2024

Cool - I'll give that a try. Many thanks for your help. :-)

from eloquent-oauth-l5.

BrendanTWhite avatar BrendanTWhite commented on August 18, 2024

In case anyone's ever looking at this, I've put together a pull request.

from eloquent-oauth-l5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.