0

我收到以下错误:

Whoops, looks like something went wrong.
1/1
ErrorException in Arr.php line 238:
explode() expects parameter 2 to be string, array given
in Arr.php line 238
at HandleExceptions->handleError('2', 'explode() expects parameter 2 to be string, array given', '/home/vagrant/api/vendor/laravel/framework/src/Illuminate/Support/Arr.php', '238', array('array' => 'photo.photo_link', 'key' => array('birthday' => array('etc...

重定向很好,但是在返回时问题就开始了。

根据社交名流聚会文档,我遵循 laravel 处理授权的方式,但是未能转储用户详细信息,我做错了什么?

我的代码:

<?php

namespace App\Http\Controllers\Auth;

use Socialite;
use Illuminate\Routing\Controller;

class AuthMeetupController extends Controller
{
    /**
     * Redirect the user to the meetup authentication page.
     *
     * @return Response
     */
    public function redirectToProvider()
    {

        if(\Input::has('code')){
            dd($this->handleProviderCallback());
        }
        return Socialite::driver('meetup')->redirect();


    }

    /**
     * Obtain the user information from meetup.
     *
     * @return Response
     */
    public function handleProviderCallback()
    {

        $user = Socialite::driver('meetup')->user();

        dump($user);

        // $user->token;
    }
}
4

0 回答 0