javascript - How to create Twitter widget? -


i want create twitter widget web application.

i don't want use widgets provided twitter because if there thousands of users have create separate widget everyone, not possible.

i want display tweets timeline of user logged in web application.

i have force web application user sign in twitter before accessing timeline.

how that?

is there having detail idea it?

please me.

by using code,you can add own twitter widget .you can customize it.

  echo "<ul id='news'>";   $twit_usr = 'username';//please enter twitter username //$num_tweets = '60'; $reader = new xmlreader(); $reader->open( 'http://api.twitter.com/1/statuses/user_timeline/'.$twit_usr.'.xml/'                              ); while ( $reader->read() )  {    if ( $reader->nodetype == xmlreader::element )     {       $name = $reader->name;       if( $name == "status" )       {         while( $reader->read() )         {             if( $reader->nodetype == xmlreader::element )             {                 $noname = $reader->name;                 if( $noname == "text" )                 {                     $reader->read();                     $checkurl = $reader->value;                     $text = preg_replace('/(?<!http:\/\/)(www.[-a-za-z0-9@:%_\+.~#?&\/=]+)/i', '<a href="http://\1">\1</a>', $text);                     $pattern = "#(http:\/\/[^ ]+)#i";                     $replacement = "<a href=\"$0\" target=\"_blank\">$0</a>";                     $finalstring = preg_replace( $pattern, $replacement, $checkurl );                     //$finalstring = ereg_replace("[[:space:]]+[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]+[[:alnum:]]+[[:space:]]", "<a href=\"\\0\">\\0</a>", $checkurl);                     $result .= '<li>'.$finalstring . '</li>';                     //break;                 }//close if noname match              }//close if nodetype         }//close while reader read inner       }//close if name item      }//close if nodetype }//close while reader-read outer  print_r($result);  echo '</ul>'; 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -