Processing
 

Setting up Twitter intent button, tweet shows 'undefined'

26/08/2016 17:12#1

Joined at: 4 months ago

Post: 1

Thank: 0

Thanked: 0

I am setting up a Twitter intent button on my webpage but no matter what I set the text portion to I always get 'null' or 'undefined'

Here is a link to my codepen: http://codepen.io/JonLangel/pen/kXdmqP?editors=0010

It's vulgar so NSFW.

Here is the HTML for the twitter button:

        <div id="twitter-button">           <a class="twitter-share-button" id="twitter" href="#"             role="button" target="_blank" data-size="large">Tweet</a>         </div> 

Here is the JavaScript:

    var my_spreadsheet = 'https://docs.google.com/spreadsheets/d/1s-X822Oiga0j0eHC8PvegRo6W8GGC0a28nVgnvSsOqo/pubhtml';      var sheet_data;      function init() {       Tabletop.init( {          key: my_spreadsheet,          callback: saveData,         simpleSheet: true       });     }     function saveData(data, tabletop) {       sheet_data = data;      }      var newQuote = function(newQuote) {         var randNum = Math.floor(Math.random() * (sheet_data.length));         $("#advice").html(sheet_data[randNum].Advice).addClass('animated zoomIn').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){   $(this).removeClass();              });     }      $(document).ready(function() {        init();        $('.container-fluid').click(function(){         newQuote();         $('#twitter').attr('href', 'https://twitter.com/intent/tweet?text=' + newQuote.randNum);     });      });    
Similar articles

How do twitter giveaways work?

8 months ago - Reply: 2 - Views: 126

How may I get genuine followers on Twitter?

3 years ago - Reply: 33 - Views: 1,828

Login to Twitter sometime fail

6 months ago - Reply: 1 - Views: 23

Twitter doesn't accept PHP's cURL, but Linux'

1 year ago - Reply: 2 - Views: 90

Twitter OAuth on iOS

5 months ago - Reply: 1 - Views: 92

why am i getting an error on .verifyCredentials()

5 months ago - Reply: 1 - Views: 35

TwitteR setup_twitter_oauth() gives an error

5 months ago - Reply: 1 - Views: 29

Tweepy - Getting the author of a retweeted tweet

5 months ago - Reply: 0 - Views: 4

Retrieving data from twitter with JavaScript

5 months ago - Reply: 0 - Views: 2

Combined social media feed returning the wrong data

5 months ago - Reply: 0 - Views: 0

Django and Twitter request_token

5 months ago - Reply: 0 - Views: 0

Python HMAC hashed value encoding to base64

5 months ago - Reply: 1 - Views: 32

At the rate symbol in facebook

5 months ago - Reply: 0 - Views: 1

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re