Facebook Connect app inside iframe not working in IE7

I am creating a Facebook Connect application that runs inside a Google gadget. As a gadget, it means the application is running inside an iframe. Inside the application there is a form that allows registered users to leave comments. Presentation is done using AJAX, but I get the same results with normal form. The problem is that I need to get facebook user id. It works fine in Firefox, but the following error appears in Internet Explorer 7:

 'A session key is required for calling this method'

I believe this is due to the way IE handles third-party cookies, because if I go to the Internet / Privacy / Advanced settings and check override the automatic cookie handling and accept all cookies, it works great. I can't pass Facebook id from javascript because anyone can fake it.

EDIT: If I open the contents of the iframe directly, the application works fine. The problem is really related to the IFRAME and IE security model.

What am I doing something wrong? How can I get around this problem?

+5
source share
4 answers

Have you tried to add a P3P policy?

cookie , IE , , cookie.

+7

, , , PHP FB connect.

, FB Connect IE7. , , FaceBook, ( , $facebook- > require_login() - null IE 7):

// Validate from Facebook that session is valid and user is logged in. require_once 'facebook/facebook.php'; $facebook = new Facebook(YourAppsAPIKeyPublic, YourAppsAPIKeySecret); $facebook->api_client->session_key = $this->userAPISessionKey; $fb_user_id = $facebook->api_client->users_getLoggedInUser();

$fb_user_id FaceBook.

Facebook + IE 7:

, , . HTAccess:

Header append P3P "CP=\"HONK\""

PHP:

header('P3P: CP="CAO PSA OUR"'); header('P3P: CP="HONK"');

: http://forum.developers.facebook.com/viewtopic.php?id=28636

ASP.NET:

protected void Application_BeginRequest(Object sender, EventArgs e)
{
    HttpContext.Current.Response.AddHeader("p3p", "CP=\"CAO PSA OUR\"");
}
+3

, , : "", , Facebook Connect. iframe.

, , . , cookie javascript, , .

...


. Facebook "fake" , . , .

+1
source

you can also see this thread created in the facebook developer platform

http://forum.developers.facebook.com/viewtopic.php?id=452

0
source

All Articles