1

Facebook を使用して自分の Web サイトにログインしようとすると、https://www.facebook.com/login.php?login_attempt=1にリダイレクトされ、昨日までは完全に機能していました。Facebook SDKとこのコードを使用しています

Facebook.Components.FacebookService _fbService = new Facebook.Components.FacebookService();

private const string FACEBOOK_API_KEY = "MY KEY";
private const string FACEBOOK_SECRET = "MY SECRET";


protected void Page_Load(object sender, EventArgs e)
{

    // ApplicationKey and Secret are acquired when you sign up for 
    _fbService.ApplicationKey = FACEBOOK_API_KEY;
    _fbService.Secret = FACEBOOK_SECRET;
    _fbService.IsDesktopApplication = false;

    string sessionKey = Session["facebook_session_key"] as String;
    string userId = Session["facebook_userId"] as String;

    // When the user uses the facebook login page, the redirect back here will will have the auth_token in the query params
    string authToken = Request.QueryString["auth_token"];

    // We have already established a session on behalf of this user
    if (!String.IsNullOrEmpty(sessionKey))
    {
        _fbService.SessionKey = sessionKey;
        _fbService.UserId = userId;
    }
    // This will be executed when facebook login redirects to our page
    else if (!String.IsNullOrEmpty(authToken)) 
    {
        _fbService.CreateSession(authToken);
        Session["facebook_session_key"] = _fbService.SessionKey;
        Session["facebook_userId"] = _fbService.UserId;
        Session["facebook_session_expires"] = _fbService.SessionExpires;
    }
    // Need to login
    else 
    {
        Response.Redirect(@"http://www.facebook.com/login.php?api_key=" + _fbService.ApplicationKey + @"&v=1.0");
    }

これが機能しなくなるような変更がFacebookにありましたか?

edit * - キャッシュをクリアしてログインしようとすると、この URL にページが表示されます

%22%2C%22sig%22%3A%2246ad34e0d00fae8cd9f9cf2daee78ff3%22%7D#=_">http://www.facebook.com/connect/uiserver.php?installed=1&session=%7B%22session_key%22%3A% 222.aqdnqyfhvjc-yjvp.3600.1351616400.1-585225540%22%2C%22UID%22%3A585225540%2C%22Expires%22%22%3A1351616400 % 2246ad34e0d00fae8cd9f9cf2daee78ff3%22%7D# =_

私のウェブサイトにリダイレクトできないかのように?

4

0 に答える 0