Twitter Tools
Adjusting Twitter tools to include more information in the post (1 post)

  1. 1beb
    Posted 3 years ago #

    I'd like to include more than just the post, in the blog posts created by twitter tools.

    function do_tweet_post($tweet) {
    		global $wpdb;
    		remove_action('publish_post', 'aktt_notify_twitter', 99);
    		$data = array(
    			'post_content' => $wpdb->escape(aktt_make_clickable($tweet->tw_text))
    			, 'post_title' => $wpdb->escape(trim_add_elipsis($tweet->tw_text, 30))
    			, 'post_date' => get_date_from_gmt(date('Y-m-d H:i:s', $tweet->tw_created_at))
    			, 'post_category' => array($this->blog_post_category)
    			, 'post_status' => 'publish'
    			, 'post_author' => $wpdb->escape($this->blog_post_author)
    		$data = apply_filters('aktt_do_tweet_post', $data, $tweet); // return false here to not make a blog post
    		if (!$data) {
    		$post_id = wp_insert_post($data);
    		add_post_meta($post_id, 'aktt_twitter_id', $tweet->tw_id, true);
    		wp_set_post_tags($post_id, $this->blog_post_tags);
    		add_action('publish_post', 'aktt_notify_twitter', 99);

    My thought was that I could update $tweet->tw_text to be something like $tweet->tw_text.' from '.'tw_id.'">Twitter'))

    But this breaks the plugin. Basically, I'd like the post content to look like: TWEET TEXT from Twitter where "Twitter" is a link to the actual status.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Twitter Tools
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.