1

使用 Facebook C# SDK 的 facebook 登录工作正常,但现在不行!发生了什么?

我让用户使用 Javascript SDK 登录。然后,当我回到页面时,当我不请求权限时,我找不到会话:

(Using only the attribute)
[FacebookAuthorize(
        LoginUrl = "/Admin/Facebook/Login")]

当属性是它应该是的时候,它根本不进入动作方法:

[FacebookAuthorize(
        LoginUrl = "/Admin/Facebook/Login",
        Perms = "publish_stream,create_event,email,offline_access,read_stream")]

在我将用户发送到操作方法之前,我使用 JavaScript 验证用户是否实际登录并且它总是正确的:

if (response.session) {
        html = response.session.access_token;

        // Tests if necessary permissions are set.
        if (response.perms) {
            var perms = response.perms;

            if (perms.indexOf("publish_stream") != -1
                && perms.indexOf("email") != -1
                && perms.indexOf("create_event") != -1
                && perms.indexOf("offline_access") != -1
                && perms.indexOf("read_stream") != -1

你认为问题是什么?

4

1 回答 1

1

您是否尝试过使用最新版本的 SDK?

于 2012-01-05T00:14:16.490 回答