Апр 23
По просьбам в коментах.
3 строчки:
<?php
$file = file_get_contents("http://api.twitter.com/1/users/show/alexvolkov.xml");
preg_match("!<followers_count>([0-9]+)<\/followers_count>!", $file, $out);
$count = $out[1];
?>
alexvolkov заменить на свой ник в твиттере.
Тут как получить число всех коментов на блоге
Тут число подписчиков фидбернера
Ноя 03
Вот, что можно сделать из твиттера при наличии желания.
Немного jQuery и оригами, и получилось вот это. Внизу форма поиска, по ней можно следить за интересующим человеком.

read all »
Сен 30
Можно общаться в твиттере, не выходя из консоли.
Пример на curl
curl -u youremail:yourpassw -d status=”text” http://twitter.com/statuses/update.xml
http://www.ibm.com/developerworks/ru/library/l-friendfeed/index.html?S_TACT=105AGX99&S_CMP=GR01
Июл 08
Можно интегрировать в свой блог, и пост автоматом уйдет в твиттер, можно встроить в админку и писать в твиттер из админки вп. Применений масса.
<?php
// Set username and password
$username = 'username';
$password = 'password';
// The message you want to send
$message = 'is twittering from php using curl';
// The twitter API address
$url = 'http://twitter.com/statuses/update.xml';
// Alternative JSON version
// $url = 'http://twitter.com/statuses/update.json';
// Set up and execute the curl process
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, "$url");
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_POST, 1);
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, "status=$message");
curl_setopt($curl_handle, CURLOPT_USERPWD, "$username:$password");
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);
// check for success or failure
if (empty($buffer)) {
echo 'message';
} else {
echo 'success';
}
?>
Май 20
Безо всяких плугов.
Без лишних телодвижений.
В файле из темы functions.php добавляем
/**
* get a short/tiny url
* @author: René Ade
* @link: http://www.rene-ade.de/inhalte/
php-code-zum-erstellen-einer-tinyurl-ueber-tinyurl-com-api.html
*/
if ( !function_exists('fb_gettinyurl') ) {
function fb_gettinyurl( $url ) {
$fp = fopen( 'http://tinyurl.com/api-create.php?url=' . $url, 'r' );
if ( $fp ) {
$tinyurl = fgets( $fp );
if( $tinyurl && !empty($tinyurl) )
$url = $tinyurl;
fclose( $fp );
}
return $url;
}
}
В index.php и single.php в желаемом месте:
<a href="http://twitter.com/home?status=
<?php echo urlencode( 'I recommend: ' ) .
fb_gettinyurl( get_permalink() ); ?>">Tweet this</a>
Все плюшки вп-инженеру.
Май 20
Весьма просто. И не надо никаких плагинов.
<?php
// Your twitter username.
$username = "TwitterUsername";
// Prefix - some text you want displayed before your latest tweet.
// (HTML is OK, but be sure to escape quotes with backslashes:
//for example href=\"link.html\")
$prefix = "<h2>My last Tweet</h2>";
// Suffix - some text you want display after your latest tweet.
//(Same rules as the prefix.)
$suffix = "";
$feed = "http://search.twitter.com/search.atom?q=from:" .
$username . "&rpp=1";
function parse_feed($feed) {
$stepOne = explode("<content type=\"html\">", $feed);
$stepTwo = explode("</content>", $stepOne[1]);
$tweet = $stepTwo[0];
$tweet = str_replace("<", "<", $tweet);
$tweet = str_replace(">", ">", $tweet);
return $tweet;
}
$twitterFeed = file_get_contents($feed);
echo stripslashes($prefix) . parse_feed($twitterFeed) .
stripslashes($suffix);
?>
Подредактировать, добавить форматирование по вкусу. Результат у меня в сайдбаре
Май 19
У виндузятников наверняка полно таких примочек, лин как обычно не балует пользователей.
Один плуг для ритмбокса, постит название песни из плеера.
Требует пару библиотек для корректной работы:
Сам плуг здесь – http://trac.codecheck.in/share/browser/platform/rhythmbox/twitter-plugin, забирать через SVN.
Thanks for Dragon3, whose wrote this plugin and explained for me, which libraries are needed for properly work. Thx man ))
Май 05
Из вордпресс при помощи данного плуга. Без всяких сторонних сервисов.
Апр 13
Позволяет постить с разных акков, постить в твиттер рсс-фиды, накручивать follow (ing/ers?).
http://tweetbots.com/