GithubHelp home page GithubHelp logo

Comments (12)

overtrue avatar overtrue commented on June 14, 2024

更新到新版试试:

composer require overtrue/socialite:^4.5.1

from socialite.

aoeng avatar aoeng commented on June 14, 2024

好了,顺便问下,因为做个APP和网站,所以加了微信的别名,这里怎么获取provider的名称啊

$userInfo = Socialite::create($request->input('platform'))->userFromCode($request->input('code'));
$userInfo->getProvider(); //这里获取的是类名,我看到里面有个NAME,但不知道怎么获取
'wechat'    => [
        'provider'      => 'wechat',
        ...
    ],
    'wechat-pc' => [
        'provider'      => 'wechat',
    ...
    ]

from socialite.

overtrue avatar overtrue commented on June 14, 2024
$userInfo->getProvider()::NAME;

from socialite.

aoeng avatar aoeng commented on June 14, 2024

会不会很难看0.0

from socialite.

overtrue avatar overtrue commented on June 14, 2024

欢迎 PR。

from socialite.

yushine avatar yushine commented on June 14, 2024

Undefined constant "Overtrue\Socialite\Contracts\ABNF_APP_ID"

一样的错误

from socialite.

overtrue avatar overtrue commented on June 14, 2024

@yushine 啥版本?

from socialite.

yushine avatar yushine commented on June 14, 2024

@overtrue facebook mapUserToObject 方法, 第一行的 Contracts\ABNF_ID 自动加载会有问题,google不会有问题,因为 User implements Contracts\UserInterface 会正常加载

Facebook:
image

Google:
image

from socialite.

overtrue avatar overtrue commented on June 14, 2024

from socialite.

yushine avatar yushine commented on June 14, 2024

版本号多少? yushine @.>于2022年10月17日 周一09:34写道:

@overtrue https://github.com/overtrue facebook mapUserToObject 方法, 第一行的 Contracts\ABNF_ID 自动加载会有问题,google不会有问题,因为 User implements Contracts\UserInterface 会正常加载 Facebook: [image: image] https://user-images.githubusercontent.com/728951/196070792-7bfd1b44-91d2-4f1b-8ba8-8b1cf41b76f3.png Google: [image: image] https://user-images.githubusercontent.com/728951/196071025-d909bf5d-7910-4b8a-b6ca-d87fa21b558f.png — Reply to this email directly, view it on GitHub <#248 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALHOYBBA6H6Z4MPSMJOZFDWDSUJ7ANCNFSM6AAAAAAQRUJNXQ . You are receiving this because you were mentioned.Message ID: @.
>

4.5.1 和 4.6.x 都一样报错

from socialite.

overtrue avatar overtrue commented on June 14, 2024

@yushine 你在什么场景下用的,代码贴一下?

from socialite.

yushine avatar yushine commented on June 14, 2024

@overtrue 和 readme 的代码一致

from socialite.

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.