WordPress.org

Ready to get started?Download WordPress

Forums

Twitter Tools
Stylise new blog posts from tweets (3 posts)

  1. danleedham
    Member
    Posted 1 year ago #

    I love the ability to create a new blog post from each of my tweets, however I'm slightly stuck at making these blog posts automatically anything but just the line pulled directly from twitter. How would I get them to be styled in a way like the styling used by Twitter's 'Embed This Tweet' section:

    <blockquote class="twitter-tweet"><p>'Tweet Content Here'</p>&mdash; 'Name' ('@username') <a href="https://twitter.com/LINKTOTWEET" data-datetime="2012-06-04T10:00:00+00:00">DATE, 2012</a></blockquote>
    <script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

    Something else slightly more random, but how would I get anything #'ed to be then used as a WordPress tag?

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

  2. danleedham
    Member
    Posted 1 year ago #

    So I've had a deeper look into the code and on line 499 following I found

    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))

    Would I be right in just adding something like:

    post_content' =>'
    <blockquote><p>' . $wpdb->escape(aktt_make_clickable($tweet->tw_text)) . '</blockquote>
    <script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>'

    Looking forward to some guidance :)

  3. danleedham
    Member
    Posted 1 year ago #

    Since the 3.4 update, this is no longer a needed feature as WP has it built in. Will the plugin give the option to have simply the link posted and so the tweet show up like it's been properly embedded?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic