0

我正在使用以下 iframe json 代码在我的网站上显示一个用于用户注册的表单。虽然当我在一定数量之后添加自定义字段时,我收到一条错误消息:

错误请求 您的浏览器发送了此服务器无法理解的请求。请求头字段的大小超过服务器限制。推荐人/n

我尝试联系我的托管帮助,他们说 facebook 代码存在问题,但我想这不是问题所在,因为在一定数量的复选框中代码可以正常工作,但一旦超出此范围,我就会明白上述错误。这是代码:

            <iframe src='http://www.facebook.com/plugins/registration.php?
                                    client_id=325340244194060&
                                         redirect_uri=http://www.pingcampus.com/facebook_registration_plugin/fbwe/trial.php&
                                    fields=[
            {
                "name": "name"
            },
            {
                "name": "email"
            },
            {
                "name": "gender"
            },
            {
                "name": "birthday"
            },

            {
                            "name": "Arts",
                            "description": "Arts",
                            "type": "checkbox",
                            "value": "Arts"
                        },
                        {
                            "name": "Act",
                            "description": "Act",
                            "type": "checkbox",
                            "value": "Act"
                        },
                        {
                            "name": "Cooking",
                            "description": "Cooking",
                            "type": "checkbox",
                            "value": "Cooking"
                        },
                        {
                            "name": "Dance",
                            "description": "Dance",
                            "type": "checkbox",
                            "value": "Dance"
                        },
                        {
                            "name": "Designing",
                            "description": "Designing",
                            "type": "checkbox",
                            "value": "Designing"
                        },
                        {
                            "name": "Fashion",
                            "description": "Fashion Designing",
                            "type": "checkbox",
                            "value": "Fashion Designing"
                        },
                        {
                            "name": "Interior",
                            "description": "Interior Designing",
                            "type": "checkbox",
                            "value": "Interior Designing"
                        },
                        {
                            "name": "Modeling",
                            "description": "Modeling",
                            "type": "checkbox",
                            "value": "Modeling"
                        },
                        {
                            "name": "Photography",
                            "description": "Photography",
                            "type": "checkbox",
                            "value": "Photography"
                        },
                        {
                            "name": "Poetry",
                            "description": "Poetry / Writing",
                            "type": "checkbox",
                            "value": "Poetry / Writing"
                        },
                        {
                            "name": "Programming",
                            "description": "Programming",
                            "type": "checkbox",
                            "value": "Programming"
                        },
                        {
                            "name": "Reading",
                            "description": "Reading",
                            "type": "checkbox",
                            "value": "Reading"
                        },
                        {
                            "name": "Sketching",
                            "description": "Sketching / Drawing",
                            "type": "checkbox",
                            "value": "Sketching / Drawing"
                        },
                        {
                            "name": "Singing",
                            "description": "Singing",
                            "type": "checkbox",
                            "value": "Singing"
                        },
                        {
                            "name": "Sports",
                            "description": "Sports",
                            "type": "checkbox",
                            "value": "Sports"
                        },
                        {
                            "name": "Stunting",
                            "description": "Stunting",
                            "type": "checkbox",
                            "value": "Stunting"
                        },
                        {
                            "name": "Videography",
                            "description": "Videography",
                            "type": "checkbox",
                            "value": "Videography"
                        },
                        {
                            "name": "Other",
                            "description": "Other",
                            "type": "checkbox",
                            "value": "Other"
                        },
                        {
                            "name": "captcha"
                        }


            ]'
                                    scrolling="auto"
                                    frameborder="no"
                                    style="border:none"
                                    allowTransparency="true"
                                    width="500"
                                    height="800"

                     >
                            </iframe>   

谁能猜出我哪里出错了?我正在使用此处给出的示例代码通过 php 处理表单。如果需要请询问代码,我也会提供 php 代码,但它与上面链接中的示例几乎相同

4

1 回答 1

0

“获取”请求通常有限制。因此,当您返回服务器时,生成的 get 请求会超出该限制。(限制由 Apache 配置设置)。与 Facebook 无关,这个限制是由您的托管服务提供商设置的,所以您问他们是对的。

选项:

  1. 要求托管服务提供商增加限制(不太可能)
  2. 将数据存储在会话变量中,或连接到唯一 ID 的数据库表中。返回时,从会话中获取数据,或者使用唯一 id 作为发送给 Facebook 的参数,并使用该唯一 id 作为返回来建立完整数据。这种方法还有其他优点(显示的数据更少,允许更少的操作最终用户)
于 2012-06-12T11:02:10.197 回答