Name

<fb:captcha/>

Synopsis

<fb:captcha/>

An element within <form/> tags, this tag places a “reCAPTCHA” image within the form that contains two pieces of text that must be entered into a text input by the user. The form gets redirected back to the URL in the action parameter for the form with the additional parameter fb_sig_captcha_grade appended, which lets your app know whether the CAPTCHA entry was successful.

Note

As a developer, you can feel proud to include reCAPTCHAs in your apps, not only because they help reduce spam on Facebook, but because every entry is a contribution back to the Archive.org project (http://www.archive.org). One of the words in the Facebook reCAPTCHA is always a word from a document scanned by Archive.org, and so your users are transcribing that text one word at a time. See http://recaptcha.net for more information on how the reCAPTCHA that Facebook uses works.

FBML-Specific Attributes

Required

None.

Optional

showalways=[true|false] default: none

If true, the CAPTCHA will appear every single time the user visits the form, regardless of whether the user previously passed the CAPTCHA test. If false, the CAPTCHA will appear only until the user passes the test once.

Example FBML

Here is example FBML code for <fb:captcha/>:

<form action="http://fbmlessentials.staynalive.com" method="post">
  <fb:captcha showalways="true"/>
  <input type="submit" value="Submit Query" />
</form>

Rendered HTML for Single Instance of Tag

The example produces a CAPTCHA box that looks like the one in Figure 3-35.

The result of our <fb:captcha/> example
Figure 3-35. The result of our <fb:captcha/> example

Additional Information

  • fb_sig_captcha_grade will be appended to the URL you pass to the action parameter within your form. If it returns 1, the user passed the CAPTCHA test. If it returns 0, the user did not pass. It is your application’s responsibility to handle this parameter appropriately.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.88.110