Facebook iframe tab signed request always empty

前端 未结 5 2440
一整个雨季
一整个雨季 2020-11-30 11:23

I\'m working on a Facebook app tab and would like to use the signed request bundle as documented here: http://developers.facebook.com/blog/post/462/

I\'m trying to u

5条回答
  •  鱼传尺愫
    2020-11-30 12:01

    Essentially, the problem is that your webserver is performing a redirect when it receives the request. In your case, it's redirecting from http://www.example.com/myfacebookapp/tab/ to http://www.example.com/myfacebookapp/tab/index.php; in my case it was redirecting from http://www.example.com/myfacebookapp/tab to http://www.example.com/myfacebookapp/tab/ (my app is built in .Net MVC, so has no filenames, but needs that trailing slash, apparently).

    So the canonical solution is to make sure that the path in the Tab URL field is the actual URL, not one that the webserver will redirect to. If the webserver has to make a redirect, then the real page is fetched by GET (not POST) and no signed_request postdata is provided to your script.

    Very frustrating; I just spend an hour and a half debugging why my test app worked and the production one didn't. To make things worse, I knew this answer, it just didn't register that this was what the problem was. Very irritating!

提交回复
热议问题