P
P
Pavel Usov2014-07-23 22:14:07
Twitter
Pavel Usov, 2014-07-23 22:14:07

How to get text from twitter while keeping links in it?

I take text from twitter using codebird-php
after initialization I write

global $cb;
  $cb->setReturnFormat(CODEBIRD_RETURNFORMAT_ARRAY);
  $timeline = $cb->statuses_userTimeline( 'screen_name=Djailds&count=5&exclude_replies=true' );
  
  foreach( $timeline as $tweet ) {
    $tweet_text = $tweet->text;
    echo $tweet_text.'<br/>';
  }

as a result, I get text without links, more precisely links like text and hashtags too
# Revera Free WordPress Theme: http://www.fabthemes.com/revera/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Borisovich, 2014-07-23
@Paul_Inglsmit

So go ahead and find out for yourself. Regulatory and forward. Of course it will give you raw text. Fuck him to store in the database too much. In general, there, for sure, everything in js is picked up by itself. Do the same.
stackoverflow.com/questions/1563844/best-hashtag-regex
stackoverflow.com/questions/9033018/regexp-to-vali...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question