How to Add the twitter follow button on my form using an Iframe

  • cheekyface
    Asked on May 5, 2014 at 3:10 AM

    Thanks for all that guys,

    That works fine.
    Any chance you can tell me how to do that for Twitter?  They don't seem to have an option that includes using a URL.  Only javascript and I think I recall that js doesnt work in jotform? 

  • TitusN
    Replied on May 5, 2014 at 3:29 AM

    Hello,

    You are right - Custom Javascript is not allowed on our platform for security reasons, and twitter's follow button requires Javascript to run.

    I would reccomend the following:

    1. Create a page on your website (give it a really obscure link, for example- https://mydomain.com/jksdhsodfhweiithsosldjsdfkskdk1233, this is just to reduce the chances of the link not being found )

    2. Add twitter's script for the follow button as shown on this link to your page where it is highlighted green in the page structure shown below:




        Twitter Button
        
        



        Your twitter button script Pasted Here


    3. Once your page is ready, use the directions shown on this thread to add the Iframe widget, and use the URL from the page you just created to add the button.

    Here is a test form: http://form.jotformpro.com/form/41233680281954

    Would that work for you? Please let us know if this has any limitations

  • TitusN
    Replied on May 5, 2014 at 4:01 AM

    The Page HTML code for your custom page does not diplay in my recent response,  here it is once again:

    <!DOCTYPE html >

    <head>
        <title>Twitter Button</title>
        <meta http-equiv="content-type" content="text/html;charset=utf-8" />
        <meta name="robots" content="nofollow" />
    </head>

    <body>
        Your twitter button script goes here
    </body>

    </html>

  • cheekyface
    Replied on May 5, 2014 at 5:14 AM

    Thanks for your help.
    That was perfect!! 

  • cheekyface
    Replied on May 5, 2014 at 5:34 AM

    ...actually I just refreshed and saw the additional comment.   

    What I did was to create a page inside an obscure named directory then named the page index.html
    With regards to the code I just deleted all code except the script from twitter and it seems to work.  I don't know if I need to position the code as your last comment but please let me know if you think it'll create problems if I don't.

     

    Here's the page and the URL I created: https://www.cheekyface.com.au/forms/jotform/TTCFtwitterTweet-CFredirected6254123/

  • TitusN
    Replied on May 5, 2014 at 5:45 AM

    Looks Ok so far -

    However I could not see the Doctype element (which tell the browser the version of html code used), or the 'no follow' meta element  (which tells search engines not to list this page on search results) -  my advice? You may want to add those in as they are important - and may cause sporadic issues - 

    How to Add the twitter follow button on my form using an Iframe Image 1 Screenshot 20

    But its functional as it is.

    Since the content is loaded from an Iframe from twitter with all the standard HTML page elements - you should not expect any issues in terms of functionality with what you have set up.