Javascript facebook注册插件自定义字段不起作用
我有一些问题。首先,iframe将只呈现“name”字段,而不呈现其他字段,即使是非自定义字段。我读到一些关于fb:registiton标签可能更适合用于自定义字段的文章,但我不知道如何使用它,因为我找不到任何使用自定义字段的例子。这是我的代码:Javascript facebook注册插件自定义字段不起作用,javascript,plugins,facebook-javascript-sdk,registration,Javascript,Plugins,Facebook Javascript Sdk,Registration,我有一些问题。首先,iframe将只呈现“name”字段,而不呈现其他字段,即使是非自定义字段。我读到一些关于fb:registiton标签可能更适合用于自定义字段的文章,但我不知道如何使用它,因为我找不到任何使用自定义字段的例子。这是我的代码: <iframe src="https://www.facebook.com/plugins/registration? client_id=39672055*******& redire
<iframe src="https://www.facebook.com/plugins/registration?
client_id=39672055*******&
redirect_uri=http://mydomain.com/signedRequest.php&fb_only=true&fields="[
{'name':'name'}, //only the name field will render
{'name':'email'},
{'name':'location'},
{'name':'gender'},
{'name':'password'},
{'name':'neighborhood','description':'In What Neighborhood Do you Live?','type':'text', 'view':'prefilled'}
]"
scrolling="auto"
frameborder="no"
style="border:none"
allowTransparency="true"
width="100%"
height="330">
</iframe>
我从另一个堆栈问题中找到了这个解决方案。对我来说,问题似乎是fields属性的开始括号之前的开始引号
<iframe src="https://www.facebook.com/plugins/registration.php?
client_id=MY_APP_ID&
redirect_uri=MY_CALLBACK_URL&
fields=[
{ 'name':'name' },
{ 'name':'first_name' },
{ 'name':'last_name' },
{ 'name':'company', 'description':'Company Name', 'type':'text' },
{ 'name':'email' },
{ 'name':'phone', 'description':'Phone Number', 'type':'text' },
{ 'name':'address1', 'description':'Address', 'type':'text' },
{ 'name':'city', 'description':'City', 'type':'text' },
{ 'name':'state', 'description':'State/Region', 'type':'text' },
{ 'name':'zip', 'description':'Zip Code', 'type':'text' }
]"
scrolling="auto"
frameborder="no"
style="border:none"
allowTransparency="true"
width="100%"
height="600">
</iframe>