0
我開始使用社交帳戶編碼註冊頁面。 我試過Facebook的成功工作。 當我嘗試谷歌簽署其顯示我這個錯誤。缺少必需的參數:範圍(使用PHP中的Google SIgn)
400. That’s an error.
Error: invalid_request
Missing required parameter: scope
Learn more
Request Details
response_type=code
redirect_uri=http://localhost/school/g.php
client_id=80808106457-e2fmm4s2dhqc5eo94nv2l84thjn6hqvl.apps.googleusercontent.com
scope=
access_type=offline
approval_prompt=force
有人請幫助me.This是我的PHP代碼
<?php
session_start();
// Include Google client library
include_once 'src/Google_Client.php';
include_once 'src/auth/Google_OAuth2.php';
/*
* Configuration and setup Google API
*/
$clientId = 'XXXXXXXXXXXXXXXXXXXXXX';
$clientSecret = 'XXXXXXXXXXXXXXXX';
$redirectURL = 'http://localhost/school/g.php';
//Call Google API
$gClient = new Google_Client();
$gClient->setApplicationName('school');
$gClient->setAccessType("offline");
$gClient->setClientId($clientId);
$gClient->setClientSecret($clientSecret);
$gClient->setRedirectUri($redirectURL);
$google_oauthV2 = new Google_OAuth2($gClient);
?>
您是否閱讀過錯誤信息? *缺少必要的參數:**範圍*** – Pharaoh
@Pharaoh我得到解決我的錯誤 – Karthik