最近我注意到我在Facebook上的應用程序停止了正常工作。Facebook oauth重定向在iframe中不起作用
當有人打開尚未授權的應用程序,但我顯示鏈接的簡單內容, 當鏈接被點擊,在應用程序中,我發出重定向(在春天我返回「重定向:... url ..」)到URL :
其發送302給定位置的iFrame。
則顯示空白IFRAME,並返回從FB以下標題:顯示
Cache-Control private, no-cache, no-store, must-revalidate
Connection keep-alive
Content-Encoding gzip
Content-Type text/html; charset=utf-8
Date Fri, 25 May 2012 10:37:11 GMT
Expires Sat, 01 Jan 2000 00:00:00 GMT
P3P CP="Facebook does not have a P3P policy. Learn why here: http://fb.me/p3p"
Pragma no-cache
Set-Cookie _e_1vFX_0=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; domain=.facebook.com; httponly locale=pl_PL; expires=Fri, 01-Jun-2012 10:37:11 GMT; path=/; domain=.facebook.com wd=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; domain=.facebook.com; httponly
Transfer-Encoding chunked
X-Content-Type-Options nosniff
X-FB-Debug VYI+cCm/Vfpx3US82n06uFuw5gF6UQDg+8GUSpGUL9A=
X-Frame-Options DENY
X-XSS-Protection 0
x-content-security-policy... allow *;script-src https://*.facebook.com http://*.facebook.com https://*.fbcdn.net http://*.fbcdn.net *.facebook.net *.google-analytics.com *.virtualearth.net *.google.com 127.0.0.1:* *.spotilocal.com:*;options inline-script eval-script;report-uri https://www.facebook.com/csp.php
而只是空白的iFrame。
當我重定向到的URL直接粘貼到瀏覽器時 - 它顯示Facebook提示以授權應用程序。
當iFrame從瀏覽器中粘貼並打開相同鏈接重定向時,爲什麼行爲會有所不同?
我注意到今天,以前的應用程序工作正常。
這是我的示例應用程序: https://apps.facebook.com/acnestop/
剛剛發現的信息在https://developers.facebook.com/docs/authentication/pagetab/,當頁面頁面標籤, 302不會工作:) – Konrad