WordPress.org

Support

Support » Plugins and Hacks » Hacks » Single twitter post not working

Single twitter post not working

  • I don’t want to use a plugin for this as I know it should work but clearly I’m missing something. I’d like the latest twitter post to show up but it doesn’t seem to work at the moment.

    This is the code I’ve used on the Home page:

    <div id="twitter_latest">
    <ul id="twitter_update_list"></ul></div>

    The following code is what I’ve used in header.php:

    <script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
    <script type=”text/javascript" src="http://twitter.com/statuses/user_timeline/24hrFootball.json?callback=twitterCallback2&count=1"></script>
    </head>

    Any idea why it’s not working? This is the website,
    http://213.5.176.1/~charity2/

    Any help would be appreciated, as I’m doing the website for a charity. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi

    @esmi

    Forum Moderator

    I;m using virtually the same scripts in a plugin and they work for me. The only real differences is that I’m enqueuing the scripts.

    wp_enqueue_script('twitter-blogger', 'http://twitter.com/javascripts/blogger.js', '', '1', TRUE);
    				$username = $instance[$widget_id]['username'];
    				$count = $instance[$widget_id]['count'];
    				wp_enqueue_script('twitter-feed', 'http://twitter.com/statuses/user_timeline/' . $username . '.json?callback=twitterCallback2&count=' . $count, array('twitter-blogger'), '1', TRUE);

    Thanks for the reply, hmm, strange.. ..I’ve played around with it but not had any joy trying a variety of configurations.

    I can see I’ll end up having to use a plugin! 🙁

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Single twitter post not working’ is closed to new replies.
Skip to toolbar