public function getAuthorizeUrl($client_id, $redirect_url, $scope = '') { $additional_args = array(); if ($scope != '') { if (is_array($scope)) { $additional_args['scope'] = implode(' ', $scope); $additional_args['scope'] = $additional_args['scope']; } else { $additional_args['scope'] = $scope; } } $additional_args['state'] = md5(time()); return parent::getAuthorizeUrl($client_id, $redirect_url, $additional_args); }