Viewing 1 replies (of 1 total)
  • Thread Starter Robert

    (@flobbit)

    I’ve patched my version of the plugin with this code:

    In widget.php:

    $tweets_array = array();
    for($i = 0;$i <= count($tweets); $i++){
        if(!empty($tweets[$i])){
            $tweets_array[$i]['created_at'] = $tweets[$i]->created_at;
    
            //clean tweet text
            if(isset($tweets[$i]->retweeted_status) && isset($tweets[$i]->retweeted_status->id)){
                $tweets_array[$i]['text'] = sprintf('RT @%s: %s', $tweets[$i]->retweeted_status->user->screen_name, $tweets[$i]->retweeted_status->text);
            }
            else{
                $tweets_array[$i]['text'] = $tweets[$i]->text;
            }
    
            $tweets_array[$i]['text'] = preg_replace('/[\x{10000}-\x{10FFFF}]/u', '', $tweets_array[$i]['text']);
    
            if(!empty($tweets[$i]->id_str)){
                $tweets_array[$i]['status_id'] = $tweets[$i]->id_str;
            }
        }
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Longer retweets are being truncated’ is closed to new replies.