fix twitter feed on my tumblr
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

twitter does not feed into my tumblr side bar where it should. please let me know which block of code I need to replace and what I should replace it with to make it work: http://jkgoldst.tumblr.com/

awarded to MSF

Crowdsource coding tasks.

1 Solution


<script type="text/javascript" src="http://yourjavascript.com/4300052148/twitterfetcher-v10-min.js"></script>

<script>
twitterFetcher.fetch('YOUR_ID_HERE', '', 3, true, true, true, '', false, handleTweets);

      function handleTweets(tweets){
          var x = tweets.length;
          var n = 0;
          var element = document.getElementById('tweets');
          var html = '<ul>';
          while(n < x) {
            html += '<li>' + tweets[n] + '</li>';
            n++;
          }
          html += '</ul>';
          element.innerHTML = html;
    }
</script>

Add this after the following lines:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="http://platform.twitter.com/widgets.js"></script>
<script type="text/javascript" src="http://static.tumblr.com/wassjkj/snwlm83tx/twitter.min.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/african_minute.json?callback=twitterCallback2&amp;count=6"></script>
<script type="text/javascript" src="http://static.tumblr.com/wassjkj/9QRlmff5u/function.js"></script>

Go to www.twitter.com and sign in as normal, go to your settings page. Go to "Widgets" on the left hand side. Create a new widget for what you need eg "user timeline" or "search" etc. Feel free to check "exclude replies" if you dont want replies in results. Now go back to settings page, and then go back to widgets page, you should see the widget you just created. Click edit. Now look at the URL in your web browser, you will see a long number like this: 345735908357048478. This is the YOUR_ID_HERE that you need to replace in the top code.

almost got it. http://jkgoldst.tumblr.com/ take a look now. if you can help me fix will add tip thanks.
jkgoldst 8 years ago
What would you like your output to look like?
ZeroCool 8 years ago
just like the preview when you go to the widget
jkgoldst 8 years ago
do you still have some time to help fix this? thanks!
jkgoldst 8 years ago
Sorry, can't help you with the layout because I'm not a CSS expert. The original output is: http://pastebin.com/bBBpaeKC You can edit the classes via CSS (user, tweet etc.). Or if you don't want to mess with the layout, you can just paste the widget code you acquired from Twitters website.
ZeroCool 8 years ago