Cannot access Facebook signed_request with an iframe tab

拈花ヽ惹草 提交于 2019-12-03 21:19:51

OK, just had this on problem myself and found the issue.

Make sure that you do not have a 301 redirect on the canvas or tab page. In my case I set the app up as "mydomain.com/facebook/tab/" but my site was doing a 301 to "www.mydomain.com/facebook/tab/"

The content would show, bit the 301 caused the signedRequest to be null.

Added "www" to my domain in the app settings and the signedRequest now contains the data I was looking for.

I just had this problem. Finally figured it out. I had to add a forward slash to the end of my Tab URLs in the application settings on the Basic tab.

Instead of: http://domain.com/facebook

I needed: http://domain.com/facebook/

I had the same problem And I resolve it. It's a problem with the URLS. Be sure that your App Domain & Page Tab URL match the same domain for example:

1) App domain: example.com Page Tab URL: example.com will work

2) App domain: example.com Page Tab URL: example.com/app/ will work

3) App domain: fb.example.com Page Tab URL: fb.example.com/app/ will work

4) App domain: fb.example.com Page Tab URL: example.com/fb will not work

After some investigation, I suspect this has something to do with where the iframe source is hosted.

When I moved everything to localhost, the signed_request started coming in fine.

Edit the settings of your tab application. On "Advanced" tab, make sure "OAuth 2.0 for Canvas" is enabled.

it's an old question but I found this with google... the problem for me was that I did a manual redirect to the https url of my pagetab and than the $_POST['signed_request'] got lost

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!