Pyrocms Contact form in facebook tabs - displaying errors on page load

 ̄綄美尐妖づ 提交于 2019-12-11 07:29:44

问题


I'm trying to use the PyroCMS Contact form in a facebook tab.

When displaying the page directly, everything is OK, the form page is displayed as wished without error message. https://facebook.noviris.com/tests/contact

When I integrate this page via a facebook page tab, it displays the form post errors on page load, not after using the submit button. https://www.facebook.com/gwadaweb?sk=app_197712883656289


回答1:


Facebook send signed_request parameter to your page tab every time you arrives to your FB page. Firebug shows this clearly.

So a good solution is stop processing your form when this parameter is present.

if ($_POST['signed_request'])
{
    // do not process form
}

Firebug also show the referrer: https://s-static.ak.facebook.com/platform/page_proxy.php?v=4. Maybe you could use this too but do not seems very trusty that this location do not change.



来源:https://stackoverflow.com/questions/8990484/pyrocms-contact-form-in-facebook-tabs-displaying-errors-on-page-load

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