Forums

Twitter Tools
Manipulate Tweet When Creating Blog Post (1 post)

  1. hwa
    Member
    Posted 7 months ago #

    Hi,

    I'm trying to create a plugin that'll manipulate tweet before posting it as blog post, such as parsing URL etc, and here's my piece of code:

    function aktt_filter($post, $tweet) {
    	// do something
    	$tweet->tw_text .= ' manipulated';
    	return $post;
    }
    add_filter('aktt_do_tweet_post', 'aktt_filter', 10, 2);

    I assume that $tweet->tw_text is the tweet content, but I'm not sure about this though, it seems like it when I hack into twitter-tools.php.

    The code is simple, it just append ' manipulated' at the end of the string. But it doesn't works, I just don't know which variable is holding the tweets before passing it to post into blog post.

    So may I know which variable should I use to manipulate the string? Or I'm doing this in a wrong way?

    Regards,

    http://wordpress.org/extend/plugins/twitter-tools/

Reply

You must log in to post.

About this Plugin

About this Topic