• Home
  • Q&A
  • facebook registration plug in custom fields not working
 
1
0
0

facebook registration plug in custom fields not working

SpilotviaStackOverflow
April 29, 2013
0 score
1 answers

I'm having a few problems with this. First, the iframe will only render the "name" field and none of the others, even those that are not custom. I read somehwere that the fb:registraiton tag might be better to use for custom fields, but I don't know how to make that work since I can't find any examples of it using custom fields. This is my code:

<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>

Answers

0 score

I found this solution from another stack question. The issue for me seems to have been the opening quote" before the opening brace of the fields attribute. This syntax works:

<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>
answered April 29, 2013
Discussion

-