4

Facebook登録プラグインのカスタムフィールドを使用して、必須ではないようにする方法はありますか?オプションにしたい「会社」と「住所2」のフィールドがありますが、これらは常に必須のようです。iframe内で使用しているコードは次のとおりです。

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

いずれかのフィールドを空白のままにすると、フィールドに入力する必要があることが返されます。

4

1 に答える 1

1

no_submitフラグを使用してオプションのフィールドを宣言してから、onvalidate関数を使用して値を使用して何かを行うことができます。つまり、Cookieに保存するか、Ajax経由でサーバーに送信します。

http://developers.facebook.com/docs/plugins/registration/advanced/を見て、no_submitに移動します。

簡単にはできませんが、できます

于 2012-03-07T15:33:40.613 に答える