
02-15-2010, 05:09 PM
|
 |
|
|
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by Hateman
Hi there,
here is my code=
Code:
// The array below are the ids of non-public forums, update these to be your admin forum ids or anything non-public by default
$excludedForums = array(59,64);
// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly = true;
if (!in_array($foruminfo[forumid], $excludedForums)) {
$shortUrl = 'http://forum.domain.de/showthread.php?t='.$newpost[threadid];
if ($useBitly) {
// http://classes.verkoyen.eu/bitly
require_once 'bitly.php';
$bitly = new Bitly('BITLYNAME', 'R_APIKEY');
$shortUrl = $bitly->shorten($shortUrl);
}
$tweet = '';
if (isset($newpost['prefixid']) && $newpost['prefixid'] != '') {
$tweet = $vbphrase['prefix_'.$newpost['prefixid'].'_title_plain'].' ';
}
$tweet .= $newpost['title'].' '.$shortUrl;
// http://classes.verkoyen.eu/twitter/
require_once 'twitter.php';
$twitter = new Twitter('MYTWITTERNAME','MYPASSWORD'
|
You're missing a chunk of code.
PHP Code:
); $twitter->updateStatus($tweet); }
|