Pyrocms在Facebook选项卡中的联系表单-在页面加载时显示错误 [英] Pyrocms Contact form in facebook tabs - displaying errors on page load

查看:88
本文介绍了Pyrocms在Facebook选项卡中的联系表单-在页面加载时显示错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Facebook标签中的PyroCMS联系人表单.

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

直接显示页面时,一切正常,将按预期显示表单页面,而不会出现错误消息. https://facebook.noviris.com/tests/contact

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

当我通过facebook页面选项卡集成此页面时,它会在页面加载时显示表单发布错误,而不是在使用提交按钮之后显示. https://www.facebook.com/gwadaweb?sk=app_197712883656289

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

推荐答案

Facebook发送 signed_request <每次进入FB页面时,将"/a>"参数添加到页面标签. Firebug清楚地显示了这一点.

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还会显示引荐来源网址: https://s -static.ak.facebook.com/platform/page_proxy.php?v=4 .也许您也可以使用此功能,但是对于此位置不会更改似乎不太信任.

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.

这篇关于Pyrocms在Facebook选项卡中的联系表单-在页面加载时显示错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆