facebook->getUser() returning 0

前端 未结 5 1510
天涯浪人
天涯浪人 2021-01-16 04:36

Whenever I try to login a prompt opens asking for the basic permissions, after that its being redirected to my redirect_uri with an URL

=\">http://loc

5条回答
  •  既然无缘
    2021-01-16 05:06

    Change this

    $loginUrl = $facebook->getLoginUrl(array ( 
            'display' => 'popup',
            'redirect_uri' => 'http://localhost/demo'
            ));
    

    to

    $loginUrl = $facebook->getLoginUrl(array ( 
            'display' => 'popup',
            'redirect_uri' => 'http://localhost/demo/index.php'
            ));
    

    And see if this works !!

提交回复
热议问题