nourelhoudabenahmed / facebook-java-api

Automatically exported from code.google.com/p/facebook-java-api
0 stars 0 forks source link

Javascript frame bust redirect from FacebookWebAppHelper not working in non-IE browsers #351

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What is the expected output? What do you see instead?
The browser should redirect window to Facebook login page, but the script is 
just displayed as plain text instead. 

What version of the product are you using? On what operating system?
3.0.2, RHEL 5.x

Please provide any additional information below.

The redirect(String) method in FacebookWebAppHelper.java on non-fbml 
applications just writes the java script redirect i.e. <script> 
window.top.location=XXXXXX </script> to the response and flushes it. Since the 
servlet response by default is a text/plain it is considered as plain text by 
non-IE browsers like Mozilla,Chrome etc. and the redirect does not happen. A 
line to set the content type as text/html should be added before flushing the 
response like

response.setContentType("text/html");

to make this work properly.

Original issue reported on code.google.com by ram.6...@gmail.com on 6 Sep 2011 at 6:13