Reputation: 5536
I'm using some barely modified sample code from Facebook to post to a user's feed:
<a class="facebook popup"
href=""
title="Post to Facebook"
onclick="FB.ui(
{
method: 'feed',
name: 'Feedback from Customer in x',
link: 'http://localhost/User/Feedback.aspx',
picture: 'http://localhost/Images/Picture.jpg',
caption: 'Caption goes here.',
description: 'Description goes here.'
}
);
return false;">
<img alt="Post to Facebook" src="../Images/feedback-fb.png"/>
But I'm seeing a couple of problems in IE(9).
SCRIPT70: Permission denied all.js?_=1316190103502, line 22 character 4250.
If it makes any difference, most browsers use the 'dialog' display type where IE in this case is using 'popup' for some reason. If I force it to use display: 'popup' then (at least) Chrome seems to work fine. Any help would be appreciated!
Upvotes: 0
Views: 1656
Reputation: 5536
I had two problems. First was an IE bug in FB which has a workaround (which is the one described here). Bug: 20168. Workaround:
FB.UIServer.setLoadedNode = function (a, b) { FB.UIServer._loadedNodes[a.id] = b; }; // IE hack to correct FB bug 20168
Found from this question here on SO.
But I also had trouble with my FB app domain - I had to configure the FB app to point to the specific subdomain I was using (x.domainname.com) otherwise in IE when I called FB.login
I got a permission denied error and another blank screen.
Upvotes: 1
Reputation: 4139
For this particular problem, I was able to have the error go away in IE9 by configuring my server to return the header (this is in nginx syntax):
add_header P3P 'CP="HONK"';
You can do the same for other servers like apache, etc., or, alternatively return it from a server script. I didn't do this but I believe the syntax in php is:
header('P3P: CP=HONK');
This is an overt shim as there's a lot more to "properly" implementing P3P. However, we just wanted to see what minimal effort was required to make this error go away and the above worked.
Upvotes: 1