FacebookSDKException: Session not active, could not store state

前端 未结 1 1424
借酒劲吻你
借酒劲吻你 2021-02-08 20:07

I don\'t understand why I\'m getting this exceptions:

Session not active, could not store state.

The code is:



        
相关标签:
1条回答
  • 2021-02-08 21:05

    You need to start a session using session_start() for the Facebook SDK to work correctly. Please add this to your code to fix the issue.

    Example:

    <?php
    
    session_start();
    
    require 'vendor/autoload.php';
    
    use Facebook\FacebookSession;
    use Facebook\FacebookRedirectLoginHelper;
    
    ...
    
    0 讨论(0)
提交回复
热议问题