0

help, im using tumblr and connect my twitter account, Tumblr gave me this file example:http://titan-theme.tumblr.com/tweets.js

my question is can i get follower_count and screen_name data? if yes how to get it? please help me thanks

2 Answers 2

1

If you have only this file you should define *recent_tweets* function. Of cours you need to import tweets.js. For example:

<script>
    var recent_tweets = function(tweets) {
        for(var i=0; i<tweets.length; i++) {
            var tweet = tweets[i];
            var followerCounts = tweet.user.followers_count;
            var screenName = tweet.user.screen_name;
        }
    }   
</script>
<script src="tweets.js"></script>

However, there is no follower_count available.

Sign up to request clarification or add additional context in comments.

Comments

0

This is a JSONP file, it needs to be requested via a script tag in order to execute the recent_tweets function that encloses it. Try using the jQuery ajax function.

$.ajax({
  dataType: "jsonp",
  success: function (result) {
    callback(result);
  }
});

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.