开发者

facebook, how to validate a registration form?

开发者 https://www.devze.com 2023-04-03 00:03 出处:网络
i am trying to do some validation to Facebook Registration Plugin i am using this code: <?php $fields = json_encode(array(

i am trying to do some validation to Facebook Registration Plugin

i am using this code:

<?php
$fields = json_encode(array(
array('name' => 'name'),
array('name' => 'first_name'),
array('name' => 'last_name'),
array('name' => 'birthday'),
array('name' => 'email'),
array('name' => 'address', 'description' => 'Address', 'type' => 'text'),
array('name' => 'zipcode', 'description' => 'Zip Code', 'type' => 'text'),
array('name' => 'phone', 'description' => 'Phone Number', 'type' => 'text')
));

?>
<div style="display: none;">
    <div id="reg开发者_JAVA技巧_istration" style="width:640px;height:auto;overflow:auto;">
    <iframe class="facebook-login" src="http://www.facebook.com/plugins/registration.php?
         client_id=153230661424821&
         redirect_uri=http://www.xxx.com/xxx.php?&
         fields=<?php echo urlencode($fields);?>"
    scrolling="auto"
    frameborder="no"
    style="border:none"
    allowTransparency="true"
    width="100%"
    height="330">
    </iframe>
    </div>
</div>

im not sure how to apply the validation code to this code.

any ideas?

Thanks


Try using the XFMBL version of the plugin.

From the Registration Advanced Uses page:

If you want to add validation to any of your fields during registration, you must use the XFBML version of the plugin, since the iframe can't do cross domain communication.

0

精彩评论

暂无评论...
验证码 换一张
取 消