WordPress.org

Forums

Single twitter post not working (3 posts)

  1. Jimbo40
    Member
    Posted 3 years ago #

    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.

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    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);
  3. Jimbo40
    Member
    Posted 3 years ago #

    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! :-(

Topic Closed

This topic has been closed to new replies.

About this Topic