我正在使用最新的FB PHP SDK中的非JS示例.它工作正常,除非用户关闭浏览器并重新打开页面.他们必须再次单击FB登录链接.
我假设$ facebook-> getUser()处理cookie.
码:
require 'sdk/facebook/src/facebook.php';
$facebook = new Facebook(array(
'appId' => 'test',
'secret' => 'test',
'cookie' => true));
// Get User ID
$user = $facebook->getUser();
// We may or may not have this data based on whether the user is logged in.
//
// If we have a $user id here, it means we know the user is logged into
// Facebook, but we don't know if the access token is valid. An access
// token …Run Code Online (Sandbox Code Playgroud) 我正在使用PhantomJS和jQuery,我想知道是否有可能捕获XMLHttpRequest,因为它传递给浏览器,而不是自己启动POST/GET.