Twitter displaying too many tweets...

Discussion in 'Web Design and Development' started by JackT06, Dec 21, 2010.

  1. JackT06 macrumors 6502

    JackT06

    Joined:
    Jul 24, 2009
    #1
    Hello,

    I have been trying to add a new way of displaying my tweets on my website.. I have used the following code;
    Code:
    <div id="twitter_update_list">
    <script type="text/javascript" src="http://twitter.com/javascripts/blogger.js">
    </script>
    <script type="text/javascript" src="http://twitter.com/statuses/user_timeline/JackTracy06.json?callback=twitterCallback2&;count=1"> 
    </script> 
    </div>
    Which clearys states only call back 1 tweet

    However, i'm getting several tweets come back see attachment for proof. Any ideas why....?
     

    Attached Files:

  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    Looks like you have a stray ; in there before count in the URL.
     
  3. JackT06 thread starter macrumors 6502

    JackT06

    Joined:
    Jul 24, 2009
    #3
    Hey,

    I just took that out, and then it didn't display any tweets.
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    I found an example on this page, and the only difference is using an HTML entity for the ampersand (& ), which may be where your ; came from.
     
  5. JackT06 thread starter macrumors 6502

    JackT06

    Joined:
    Jul 24, 2009
    #5
    Ahh, thanks:)

    Could you have a quick look at my site www.hampshiredoeyouthforum.uphero.com scroll the bottom and look where the twitter feed and see why it don't seem to be staying inside the box...?

    I have got the following code now;
    CSS;
    Code:
    #twitter_div {
    	background-image: url('twitterBG.png');
    	background-repeat: no-repeat;
    	border-bottom-style: solid;
    	border-bottom-width: 1px;
    	border-bottom-color: #5AA5BC;
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 0.9em;
    	margin-top:10px;
    	padding-top: 30px;
    	padding-right: 5px;
    	padding-left: 5px;
    }
     
    #twitter_div ul li {
    	color: #0C93BA;
    	border-bottom-style: solid;
    	border-bottom-width: 1px;
    	border-bottom-color: #A1E8F7;
    }
     
    #twitter_div ul li a {
    	text-decoration: none;
    	color: #DDA84E;
    }
     
    #twitter_div ul li a:hover {
    	text-decoration: none;
    	color: #D78E42;
    }
     
    #twitter_div p {
    	text-align: right;
    	padding-right: 6px;
    	padding-bottom: 10px;
    }
    HTML;
    Code:
    <div id="twitter_div">
    	<ul id="twitter_update_list">
    		<li></li>
    	</ul>
    </div>
    <script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
    <script type="text/javascript" src="http://twitter.com/statuses/user_timeline/JackTracy06.json?callback=twitterCallback2&count=2"></script>
     
  6. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #6
    It's going outside of that box (which is just a background image so not an actual box), because you didn't set a width on #twitter_div. Give it about 340px and it will wrap within that background image.
     
  7. JackT06 thread starter macrumors 6502

    JackT06

    Joined:
    Jul 24, 2009
    #7
    DUH?! STUPID :eek:

    Thankyou for your help once again Angelwatt:)
     

Share This Page