Google ReCaptcha Implementation

  1. 4 years ago

    Brock N

    4 Dec 2014 Pre-Release Testers, Xojo Pro
    Edited 4 years ago

    Google came out with their new ReCaptcha feature the other day so I implemented it and its working GREAT.
    https://developers.google.com/recaptcha/

    Feel free to include it in your projects.
    Here's a sample project with it included
    https://www.dropbox.com/s/g8x84mqeiq1j7z2/WebControlLibrary-2014-12-04.zip?dl=0

    Drag it in like any other custom control, set the SiteKey and SecretKey properties, and then implement the Verified event.

    UPDATE
    https://www.dropbox.com/s/5fs42iygzkry7po/WebControlLibrary-2014-12-08.zip?dl=0

    I added the "dark" theme and made it so it doesn't throw a javascript error when "shown" an additional time.

  2. Albin K

    4 Dec 2014 Europe (Sweden)

    Should be great! I was looking at something like this some time ago. I'll give it a spin tomorrow!
    Thanks, Brock! :)

  3. Michel B

    4 Dec 2014 Pre-Release Testers RubberViews.com

    @Brock N Google came out with their new ReCaptcha feature the other day so I implemented it and its working GREAT.
    https://developers.google.com/recaptcha/

    Feel free to include it in your projects.
    Here's a sample project with it included
    https://www.dropbox.com/s/g8x84mqeiq1j7z2/WebControlLibrary-2014-12-04.zip?dl=0

    Drag it in like any other custom control, set the SiteKey and SecretKey properties, and then implement the Verified event.

    I just saw that on Tech News this morning. Thank you Brock :)

  4. Brock N

    4 Dec 2014 Pre-Release Testers, Xojo Pro

    I'd love to get any feedback. The control is crazy simple to use but there's a few minor features I could still add to it. The "dark" theme is one of those for example.

  5. Albin K

    4 Dec 2014 Europe (Sweden)
    Edited 4 years ago

    hmm, can't use it in 2013r33.
    I get a Syntax error: WebReCaptcha.FrameworkPropertyChanged.

    Guess I need to upgrade soon :P

  6. Ercole G

    5 Dec 2014 Pre-Release Testers, Xojo Pro

    Thanks Brock to share it.

  7. Michel B

    5 Dec 2014 Pre-Release Testers RubberViews.com

    @Brock N I'd love to get any feedback. The control is crazy simple to use but there's a few minor features I could still add to it. The "dark" theme is one of those for example.

    It works perfectly :)

  8. Brock N

    5 Dec 2014 Pre-Release Testers, Xojo Pro
    Edited 4 years ago

    @Albin K hmm, can't use it in 2013r33.
    I get a Syntax error: WebReCaptcha.FrameworkPropertyChanged.

    Guess I need to upgrade soon :P

    Yeah the WebSDK didn't have the HTMLHeader Hook event back in 2013 which this control uses. And apparently the FrameworkPropertyChanged event didn't exist yet either

  9. Albin K

    5 Dec 2014 Europe (Sweden)

    It works great though when I try in the latest version!
    Kudos!

  10. Jay M

    6 Dec 2014 Pre-Release Testers, Xojo Pro NC, USA

    @Brock N I'd love to get any feedback.

    It works alright, but if I go to another page, then back to the page with the recaptcha control, I get a js error:

    Could not execute returned javascript: ReCAPTCHA placeholder element must be empty
    Source: grecaptcha.render('QCr6nITF', {
    'sitekey' : '6Ld_xv4SAAAAALuIg6cTR-Wn3Zb4dnF3vPkBbp3I'
    , 'callback' : function(callback){Xojo.triggerServerEvent('QCr6nITF','Verify',[callback])}
    });
  11. Brock N

    8 Dec 2014 Pre-Release Testers, Xojo Pro

    @Jay M It works alright, but if I go to another page, then back to the page with the recaptcha control, I get a js error:
    Could not execute returned javascript: ReCAPTCHA placeholder element must be empty Source: grecaptcha.render('QCr6nITF', { 'sitekey' : '6Ld_xv4SAAAAALuIg6cTR-Wn3Zb4dnF3vPkBbp3I' , 'callback' : function(callback){Xojo.triggerServerEvent('QCr6nITF','Verify',[callback])} });

    Hmmm I call the reCaptcha's render JS event in the Xojo shown event. Do you mean your navigating from one WebPage to another within the Xojo app or within the browser? It must fail if the shown event is called a second time, and I was thinking I could rely on this being called once.

  12. Jay M

    8 Dec 2014 Pre-Release Testers, Xojo Pro NC, USA

    @Brock N Hmmm I call the reCaptcha's render JS event in the Xojo shown event. Do you mean your navigating from one WebPage to another within the Xojo app or within the browser? It must fail if the shown event is called a second time, and I was thinking I could rely on this being called once.

    Yes, navigating back to the page within the app (user clicks a menu button, page is shown). Open is called once, Shown is called every time the page (and therefore control) is... um... shown.

  13. Brock N

    8 Dec 2014 Pre-Release Testers, Xojo Pro Answer

    UPDATE
    https://www.dropbox.com/s/5fs42iygzkry7po/WebControlLibrary-2014-12-08.zip?dl=0

    I added the "dark" theme and made it so it doesn't throw a javascript error when "shown" an additional time.

  14. Jay M

    8 Dec 2014 Pre-Release Testers, Xojo Pro NC, USA

    @Brock N UPDATE
    https://www.dropbox.com/s/5fs42iygzkry7po/WebControlLibrary-2014-12-08.zip?dl=0

    I added the "dark" theme and made it so it doesn't throw a javascript error when "shown" an additional time.

    Thanks. Works great!

  15. Michel B

    8 Dec 2014 Pre-Release Testers RubberViews.com

    @Brock N UPDATE
    https://www.dropbox.com/s/5fs42iygzkry7po/WebControlLibrary-2014-12-08.zip?dl=0

    I added the "dark" theme and made it so it doesn't throw a javascript error when "shown" an additional time.

    Thank you !

  16. 2 years ago

    ronaldo f

    24 Jul 2016 Pre-Release Testers, Xojo Pro Philippines

    Hi Guys!

    Just last night, I try to UPLOAD this program on my own IIS server using my own RECAPTCHA key.

    But it doesn't work when uploaded to host but its function if run on my IDE.

    Here is the link of the uploaded file

    http://xojo.pentagamma.net/10/webcontrollibrary.cgi

    Anybody had success on this?

  17. last week

    @Brock N UPDATE
    https://www.dropbox.com/s/5fs42iygzkry7po/WebControlLibrary-2014-12-08.zip?dl=0

    I added the "dark" theme and made it so it doesn't throw a javascript error when "shown" an additional time.

    Hi Brock,

    I ran your sample webapp, but maybe the keys are not valid for a test?

    about Google, do you know if any kind of use is free, after registering the site?

    Thank You

  18. Brock N

    Dec 5 Pre-Release Testers, Xojo Pro

    @GiacomoBernardi about Google, do you know if any kind of use is free, after registering the site?

    Yes registration and use of your own keys is free

  19. @Brock N Yes registration and use of your own keys is free

    thank you.
    how can I test your project, using the included keys?

  20. 6 days ago

    Mariano P

    Dec 6 Pre-Release Testers, Xojo Pro Argentina

    Thanks Brock to share...
    Is it possible to change the image and get it in Spanish ?
    I'm not a robot = No soy un robot

or Sign Up to reply!