• Resolved nickgrossman

    (@nickgrossman)


    Hi–

    Thanks so much for the great plugin!

    I am using it to enable twitter-based comments on wordpress blog posts. In order to make that work, I needed to save the Twitter ID of the tweet created when the post was published.

    The way I did that was by adding the following to line 475 of wp-to-twitter.php:

    
    update_post_meta( $id, '_jd_wp_tweet_id', $body->id);
    

    Then, in my template, I add the following:

    
    <?php if (get_post_meta($post->ID, '_jd_wp_tweet_id')): ?>
    <a class="twitter-discuss-button" target="_twitter" href="https://twitter.com/<?php echo get_option('wtt_twitter_username'); ?>/status/<?php echo get_post_meta($post->ID, '_jd_wp_tweet_id', true); ?>">Discuss on Twitter</a>
    <?php endif; ?>
    

    It would be amazing if you could incorporate the change to wp-to-twitter.php

    Thanks!
    Nick

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Pull Request: Save Tweet ID to WP Database’ is closed to new replies.