Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Tim

    (@tkaufmann)

    Slightly improved version:

    if ($tweet->retweeted_status) $tweet_text = "RT " . $tweet->retweeted_status->user->name . ": " . $tweet->retweeted_status->text;

    Thread Starter Tim

    (@tkaufmann)

    Damn.

    if ($tweet->retweeted_status)
                $tweet_text = "RT " . $tweet->retweeted_status->user->name . ": " . $tweet->retweeted_status->text;
    Thread Starter Tim

    (@tkaufmann)

    Correct username:

    if ($tweet->retweeted_status)
                $tweet_text = "Retweet @" . $tweet->retweeted_status->user->name . ": " . $tweet->retweeted_status->text;
    Plugin Author Chandan Kumar

    (@chandanonline4u)

    Thanks for sharing the code.

    Thread Starter Tim

    (@tkaufmann)

    Welcome.

    Hi – I tried to put this code in but I’m not sure if I have done it correctly – I could not see line numbers in the editor so I just pasted it just before the end of the code. However, long RT still gets truncated – usually the URL at the end, which makes the post redundant.

    Can you help me with this?

    Thanks ??

    Plugin Author Chandan Kumar

    (@chandanonline4u)

    Place the code above the $data array deceleration which is above the line “$insert_id = wp_insert_post($data);”.

    Chandan – that seems to have worked – will monitor longer RTs to be sure but hopefully that is it. Thank you very much.

    Using this code then RT links do not get “linkified”.

    Can we get a proper fix for this?

    As far as I’m concerned, this is not yet resolved.

    Plugin Author Chandan Kumar

    (@chandanonline4u)

    Hey Joshuaiz,

    Sorry for delayed reply, Yes links will get removed, if you place this code just above the wp_insert_post() arguments.

    It is overriding the code we have used to make links under tweet text variable. Please place this code:

    $tweet_text = $tweet->text;
    if($tweet->retweeted_status){
       $tweet_text = "RT @" . $tweet->retweeted_status->user->name . ": " . $tweet->retweeted_status->text;
    }
    $tweet_text = preg_replace($pattern, $replace, $tweet_text);

    In place of (code line number 229):

    $tweet_text = preg_replace($pattern, $replace, $tweet->text);

    I have tested this on my system. It works.

    Thanks for this ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Retweets get truncated’ is closed to new replies.