Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Silex + Twig 应用程序在没有 iframe 的情况下在 Heroku 上运行得很好,但是当在 Facebook 中进行 iframe 时,它会引发异常。
MethodNotAllowedHttpException:找不到“POST /”的路由:不允许方法(允许:GET)
Silex 是否有任何特殊的方式可以通过 Facebook 处理任何请求?
如果您的应用程序在 facebook 中加载(在 iframe 中),第一个请求是 POST,而不是 GET。您的路线被定义为仅限获取。将其更改为->method()(或什至->post(),但我推荐方法),它会工作。
->method()
->post()