WordPress.org

Ready to get started?Download WordPress

Forums

Tweets As Posts
Post as "status" format? No problema, amigo. (3 posts)

  1. ppriede
    Member
    Posted 1 year ago #

    So, you want your tweet to post as "status" format? (using WP 3.4.2)
    No problem.
    (this is a very rough solution...but it works)

    around line 193, you have this...

    // Add custom fields to the post
                    add_post_meta($post_id, $meta_key = "status_id", $meta_value=$item["id"], $unique=TRUE);
                    add_post_meta($post_id, $meta_key = "status", $meta_value=$item["description"], $unique=TRUE);
                    add_post_meta($post_id, $meta_key = "status_href", $meta_value=$item["link"], $unique=TRUE);
                    add_post_meta($post_id, $meta_key = "twitter_username", $meta_value=$item["twitter_username"], $unique=TRUE);
                    add_post_meta($post_id, $meta_key = "twitter_username_link", $meta_value=$item["twitter_username_link"], $unique=TRUE);  
    
                    return TRUE;

    just add this little line (above the return TRUE)...

    // Add custom fields to the post
                    add_post_meta($post_id, $meta_key = "status_id", $meta_value=$item["id"], $unique=TRUE);
                    add_post_meta($post_id, $meta_key = "status", $meta_value=$item["description"], $unique=TRUE);
                    add_post_meta($post_id, $meta_key = "status_href", $meta_value=$item["link"], $unique=TRUE);
                    add_post_meta($post_id, $meta_key = "twitter_username", $meta_value=$item["twitter_username"], $unique=TRUE);
                    add_post_meta($post_id, $meta_key = "twitter_username_link", $meta_value=$item["twitter_username_link"], $unique=TRUE);
                    set_post_format($post_id,"status");
                    return TRUE;

    Again, this plugin is great...

    I'm thinking in a way to "decode" (in the simplest way) twits with pictures (twitter, instagram, etc.)
    I know this is in Chandesh (developer) plans, but i can hardly wait for it...

    Greetings

    http://wordpress.org/extend/plugins/tweets-as-posts/

  2. Chandesh Parekh
    Member
    Plugin Author

    Posted 1 year ago #

    Hi ppriede,

    Again many thanks for that solution.

    Regarding the pictures I am hoping to be able to work on that very soon.

    Thanks & regards,
    Chandesh.

  3. kevintucker
    Member
    Posted 1 year ago #

    You could also use this solution to automatically make all posts in a certain category into a certain post format. I was able to modify it to do multiples of the same in one plugin, and I'm currently using the combination of that and this plugin to do so with imported tweets.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic