小编rel*_*elm的帖子

Facebook PHP SDK,如何维护持久登录

我正在使用最新的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)

php facebook oauth

8
推荐指数
1
解决办法
2660
查看次数

使用jQuery捕获XHR?

我正在使用PhantomJS和jQuery,我想知道是否有可能捕获XMLHttpRequest,因为它传递给浏览器,而不是自己启动POST/GET.

jquery phantomjs

1
推荐指数
1
解决办法
1800
查看次数

标签 统计

facebook ×1

jquery ×1

oauth ×1

phantomjs ×1

php ×1