문제

The facebook login using the Facebook C# SDK was working, but now is not! What happened?

I get the user to log in using the Javascript SDK. Then, when I get back to the page, I cannot find the session when I don't ask for the permissions:

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

When the attribute is as it should be, it simply doesn't enter the action method:

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

Before I send the user to the action method, I verify using JavaScript that the user is actually logged in and it is always true:

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

What do you think the problem is?

도움이 되었습니까?

해결책

Have you tried using the latest version of the SDK?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top