PDA

View Full Version : Twitter - How?



.Zi
15-07-2009, 05:58 PM
Well, I saw it in this layout (http://img124.imageshack.us/img124/4058/portfoliocopy.png)and realised I could use with something like this. Its the twitter with the latest twitter message. SO like, I could text to this number a message of the day and then it comes up on my site, I haven't designed the site yet, so I can't put it on and test it, but +rep will be given.

Pyroka
15-07-2009, 06:00 PM
I'm guessing you'd call the latest tweet using the Twitter API. Somebody made a system like that and they posted it only a few days ago. I'd use the search function to find out, cuz rly I swear somebody posted it!

Sam
15-07-2009, 06:35 PM
Here's the files i used:

http://www.designtest.hostoi.com/tweetbasic.rar

Just place:



<script type="text/javascript">
$(document).ready(function(){
$("#twitdisplay").hide();

$("#twitdisplay").load("tweet.php", function(){
$(this).fadeIn();
$("#loadingtweet").hide();
});

});

</script>


in between the <head> tags at the top of the page, then



<div id="twitdisplay"><div id="loadingtweet">Loading...</div></div>


Where you wish to display the tweet.

Edit the tweet.php file to your twitter username..

I'd give credit to whoever made this, but i google searched for it and cant remember where i got it from. So yeah, credit to someotherguy

.Zi
15-07-2009, 06:38 PM
Here's the files i used:

http://www.designtest.hostoi.com/tweetbasic.rar

Just place:



<script type="text/javascript">
$(document).ready(function(){
$("#twitdisplay").hide();

$("#twitdisplay").load("tweet.php", function(){
$(this).fadeIn();
$("#loadingtweet").hide();
});

});

</script>
in between the <head> tags at the top of the page, then



<div id="twitdisplay"><div id="loadingtweet">Loading...</div></div>
Where you wish to display the tweet.

Edit the tweet.php file to your twitter username..

I'd give credit to whoever made this, but i google searched for it and cant remember where i got it from. So yeah, credit to someotherguy


Thanks, +rep,

Sam
15-07-2009, 06:39 PM
Np, if you still get stuck with it send me a PM :)

Pyroka
15-07-2009, 06:40 PM
I think somebody else had the same idea tbh... loads of people are using that. :P

Sam
15-07-2009, 06:42 PM
I know i was browsing a few inspiration sites the other day and 9/10 had twitter message boxes. Hell i don't even use twitter but i put it on layouts i use, just because i offer them out free and other people use it lol :P

Pyroka
15-07-2009, 06:43 PM
They do look very attractive though... Some people need to think about what goes on their twitter though when they do that. xD

efq
16-07-2009, 02:53 PM
But wouldn't it be a waste of time to have all that crushed by Twitter because people use Twitter because its famous now lol.

Turbocom
16-07-2009, 09:26 PM
Instead of using all that code that was given use this


<?php

// The function that will do the grabbing of the tweet
function getTweet($url) {

// Get the contents of the ATOM file
$feed = file_get_contents($url);
// Make an XML instance of it
$xml = new SimpleXMLElement($feed);

// Using the XML get the tweet, for this we needed to work out the xml structure
$tweet = $xml->entry->title;

return $tweet;

}

// $username is your twitter username
$username = "YOUR TWITTER USERNAME GOES HERE";

// This is the API call URL. &rpp=1 means we will only get the latest status
$url = "http://search.twitter.com/search.atom?q=from:".$username."&rpp=1";

// Use our function we made earlier to grab our latest tweet and echo it
echo getTweet($url);

// Made by Richard Knox
?>

A little searching goes far

http://www.habboxforum.com/showthread.php?t=589304&highlight=Twitter+Status

iPlonker
22-07-2009, 12:27 AM
has anyone got the files for this, seeing as the link doesn't work for me x]!

William93
22-07-2009, 10:22 AM
I echo the above post.

Want to hide these adverts? Register an account for free!