2

有人测试过下面的场景吗?

1-退出Facebook

2-转到具有“喜欢”按钮的页面

3- 点击赞,然后从弹出窗口登录 Facebook

我订阅了 edge.create 并调用 FB.getLoginStatus(function(response) { }); 为了确保用户在单击“赞”按钮时已登录。

单击like 按钮时,响应状态未知,会话为空,这不是我所期望的。

    FB.Event.subscribe('edge.create', function(href) {
        FB.getLoginStatus(function(response) {
            alert("inside edge create login status callback" + JSON.stringify(response));
        });
    });
4

1 回答 1

0

找到解决方案:使用第二个参数“true”调用 FB.getLoginStatus 会强制它从服务器获取登录状态。

FB.getLoginStatus(function(response) {}, true)
于 2011-08-19T12:58:56.177 回答