Metadata
Description
With the Twitter API 1.1, which requires OAuth, the old twitter plugin need replacing.
Environments
inclusivedesign.ca
Comments
-
Greg Gay commented
2013-07-11T16:33:45.468-0400 There are no WP modules that support multiple twitter feeds. I have created a standalone plugin based on the twitteroath library, that will allow multiple feeds, though it requires entering the OAuth delails into the appropriate WP template.
wp-content/plugins/twitteroauth/twitteroauth/twitteroauth.php
Will need a template like the following for each of the feeds we want to display
<?php // eg themes/idi-theme/tweets-SNOWocad.php
require_once("wp-content/plugins/twitteroauth/twitteroauth/twitteroauth.php");
$twitter_un = "SNOWocad";
$num_tweets = 3;
$consumerkey = "fHDGIckUSPpd4koYiBVOw";
$consumersecret = "I3KKfzDT34eR9TXekZsXod750SdC2JydGVKj0ZFlU";
$accesstoken = "199785294-UB4hnT6tsbbRD2bKSUGNgryPnS4hDJjtQpPtFGx7";
$accesstokensecret = "kcXrb0WzyUYijk97u1RdFrG7hSS5vpyUbWxpfls";
$connection = new TwitterOAuth($consumerkey, $consumersecret, $accesstoken, $accesstokensecret);
$tweets = $connection->get("https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=".$twitter_un."&count=".$num_tweets);
//print_r($tweets);
?> <div class="idi-box idi-highlight-box twitter-feed-group">
<div class="idi-box-text">
<a class="twitter-follow-button" rel="external nofollow" href="http://twitter.com/SNOWocad" title="Follow @SNOWocad">@SNOWocad</a>
<ul> <?php
foreach($tweets as $tweet) {
echo '<li class="even">'.$tweet->text.'<br><a href="https://twitter.com/intent/retweet?tweet_id='.$tweet->id.'">retweet</a><hr></li>';}
?>
</ul>
</div>
</div> -
Greg Gay commented
2013-07-12T10:43:36.388-0400 Pushed into idi-theme Development branch a224bbb..e67c927
-
Greg Gay commented
2013-07-12T10:45:54.137-0400 pushed twitteroauth lib into inclusivedesign.ca development branch d31d7f6..bb13efa