Getting connectSession.IsConnected() always false, was working before...

Jul 20, 2012 at 12:07 PM
Edited Jul 20, 2012 at 12:08 PM

My app is on production server and stopped unexpectedly...

connectSession.IsConnected() is always returning false.

The code snippet is as follow,

aspx page:

 <script type="text/javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php">

</script>
 <fb:login-button perms="publish_stream, email" onlogin='window.location="FacebookSocialMediaInterPage.aspx"'>     

</fb:login-button>
<script type="text/javascript"> 

  FB.init('<%=ConfigurationManager.AppSettings["FacebookAPI"] %>', "xd_receiver.htm", { "ifUserConnected": "AfterFBLogin.aspx" });         

  </script>

 

AfterFBLogin.aspx.cs Page:

protected void Page_Load(object sender, EventArgs e)       

{

Facebook.Session.ConnectSession connectSession connectSession = new Facebook.Session.ConnectSession(<FacebookAppKey>, <FacebookAppSecret>);               

 connectSession.Login();

 if (connectSession.IsConnected())  //THIS ALWAYS RETURNING FALSE

{

//My business logic is here...

}

}

Thanks in advance.

Vaibh


Jul 21, 2012 at 3:51 PM

Same issue here.

Did Facebook changed anything?

If somethings do not work anymore with facebook, my rule is: just wait for one week and if it still does not work, then start worrying.

Unfortunately, this issues now is aout 5 days and I'm starting to get worried.

Hope someone can help us out of this misery.
Don't have the time to convert my running project to the C# SDK. :-/

 

Jul 27, 2012 at 12:34 PM

I am also facing same issue

My code connectSession.IsConnected() was working 10 days back ,now i am unable to login using facebook

 

After tracing issue , i get to know that  , we are unable to get facebook cookies to get validate

HttpContext.Current.Request.Cookies[fullCookie] is always null

private static string GetFacebookCookie(string cookieName)
    {
        string retString = null;
        string fullCookie = ApiKey + "_" + cookieName;

        if (HttpContext.Current.Request.Cookies[fullCookie] != null)
            retString = HttpContext.Current.Request.Cookies[fullCookie].Value;

        return retString;
    }

Please let me know some one get better solution

Actually i want to send private message notification to facebook friend with this code and if some one have better solution please let me know

 

Jul 27, 2012 at 3:15 PM

I found that the API support for previous API providers is also down.

I have replaced the API with new API from computerBeacon.net http://computerbeacon.net/ Now Facebook integration to my app is working fine.