Facebook streamPublish cross-scripting error on IE8
For the past week I’ve worked on a big internet campaign that included an website where the users could connect to facebook using facebook connect and publish content from the site to their profile wall.
When I tried to publish the post on facebook I encountered an error I haven’t seen before and this error occurred only in Internet Explorer 8 , non of the other browsers (chrome, ff etc) produced this error and the content didn’t appear in the publish box.
The was the error:
“ Internet explorer has modified this page to help prevent cross-site scripting “
After googeling didn’t give me the answer I tried to modify the content I pass facebook on the FB.Connect.streamPublish function and I discovered that the parameter of the user_text has a limitation of 95 non English characters (my text was in Hebrew) cutting the text to less then the limitation fixed the issue!
Hope this helps,
Netanel Lev
Hi Netanel,
ReplyDeleteAfter many frustrating hours, I was finally able to construct a combination that Facebook would accept: I left the message field blank and added an attachment with a picture, link, and caption. That did the trick.
Chaim