tags:

views:

84

answers:

1

How to show only last tweet of mine using PHP, without javascript? I want to show my own last tweet on a web page.

in this output

<p>Add a comment to your closing DIV tag – it could save you hours 
   <a>http://ping.fm/venna&lt;/a&gt;
   <span>8:25 AM Apr 15th</span>
</p>  
+2  A: 

I would parse with php the result of http://api.twitter.com/1/statuses/user_timeline.json?id=noradio&amp;count=1 (replacing noradio) and then outputs the HTML you want

See also this page for some example

RC
will it work even if javascript disabled?
metal-gear-solid
Ya, it has nothing to do with javascript.
isbadawi
@RC - ok i will try in evening
metal-gear-solid
@metal-gear-solid: no javascript will be hurt during the test ;) It's pure PHP. In the linked page I added they use some php librairie to parse json but that's optionnal in PHP 5.2 (see `json_decode` in php manual)
RC
@RC _ +1 Thanks for answer I will try then will tell you
metal-gear-solid
@RC - Hi RC .I noticed this is for Wordpress. I need for simple PHP site. I'm noob in PHP. Thanks.
metal-gear-solid
Here's another example: http://bit.ly/akUDpi (Note the PHP script is mangled by google translate)
RC
@RC - Great help. Thanks
metal-gear-solid