Would it be possible to add to the importer the ability to include a link to the actual tweet on twitter.com? I'm using this plugin to backup my twitter profile, and the only bummer is that I have no way of getting back to that tweet on twitter.com.
Would it be possible to add to the importer the ability to include a link to the actual tweet on twitter.com? I'm using this plugin to backup my twitter profile, and the only bummer is that I have no way of getting back to that tweet on twitter.com.
Ooh, just enabled custom-fields in the screen options and saw that the tweet id is saved, so i can use that to generate the urls. You guys are awesome! :)
For anyone looking for this same feature, here's a function you can use to replace the_permalink, if you want to send it to the twitter unique tweet url.
function twitter_permalink( $echo = true ) {
global $post;
$twitter_username = sanitize_title_with_dashes( get_option( 'aktt_twitter_username' ) );
$tweet_id = get_post_meta( $post->ID, 'aktt_twitter_id', true );
$twitter_permalink = 'http://twitter.com/'. $twitter_username .'/status/'. $tweet_id;
if ( $echo == false )
return $twitter_permalink;
else
echo $twitter_permalink;
}
And to use it in your code, something like this:
<a href="<?php twitter_permalink(); ?>" target="_blank">view on twitter</a>
Or to return it in function, something like this:
$twitter_permalink = twitter_permalink( false );
echo '<a href="'. $twitter_permalink .'" target="_blank">view on twitter</a>';Or you could use the built-in aktt_status_url() method... and you'd be better off using esc_url() on the final URL than sanitizing the username on retrieval.
You must log in to post.