dragam0217 2017-12-27 10:31
浏览 87

使用FB和Google API与PHP时出错

I am using FB SDK and Google API for login on my website. If I comment one API then other API works perfectly.

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>";

    }

If I run simultaneously then got error If I run Google then got this error

Facebook SDK returned an error: Cross-site request forgery validation failed. Required GET param "state" missing.

If I run FB then got this error

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." }

Can someone help me with this??

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
    • ¥15 MATLAB中streamslice问题
    • ¥15 如何在炒股软件中,爬到我想看的日k线
    • ¥15 51单片机中C语言怎么做到下面类似的功能的函数(相关搜索:c语言)
    • ¥15 seatunnel 怎么配置Elasticsearch
    • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
    • ¥15 (标签-MATLAB|关键词-多址)
    • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
    • ¥500 52810做蓝牙接受端
    • ¥15 基于PLC的三轴机械手程序