我正在使用FB SDK和Google API在我的网站上登录。如果我评论一个API,那么其他API工作正常。
require_once '../vendor/autoload.php';
require_once '../src/fb.php';
require_once '../src/google.php';
if(isset($_SESSION['checkLogin'])){
echo "<a href='logout.php'>Logout</a>";
}
如果我同时运行则会出现错误如果我运行Google则会出现此错误
Facebook SDK returned an error: Cross-site request forgery validation failed. Required GET param "state" missing.
如果我运行FB则会出现此错误
Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `POST https://www.googleapis.com/oauth2/v4/token` resulted in a `400 Bad Request` response: { "error": "invalid_grant", "error_description": "Malformed code." }
有人可以帮我解决这个问题吗?