Not having much luck with this atm.... Anyone able to give me hand/spot whats off with my code?
PHP 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(9,10,55,40,62,36,61,19,50,12,27,28,71,72,73,74,29,30,31,32,33,34,39,49,54,65,70,78,75,76,47,45,81,82,6,7,80);
// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly = true;
if (!in_array($foruminfo[forumid], $excludedForums)) {
$shortUrl = 'http://www.collegetalkspot.com/showthread.php?t='.$newpost[threadid];
if ($useBitly) {
// http://classes.verkoyen.eu/bitly
require_once 'bitly.php';
$bitly = new Bitly('<collegetalkspot>', '<R_********************************>');
$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('<collegetalkspot>','<**************>');
$twitter->updateStatus($tweet);
}
This is the error i keep getting:
Code:
Fatal error: Uncaught exception 'BitlyException' with message 'You must be authenticated to access shorten' in /home/srorg/public_html/collegetalkspot.com/bitly.php:193 Stack trace: #0 /home/srorg/public_html/collegetalkspot.com/bitly.php(382): Bitly->doCall('shorten', Array) #1 /home/srorg/public_html/collegetalkspot.com/global.php(28) : eval()'d code(30): Bitly->shorten('http://www.coll...') #2 /home/srorg/public_html/collegetalkspot.com/global.php(28): eval() #3 /home/srorg/public_html/collegetalkspot.com/forum.php(69): require_once('/home/srorg/pub...') #4 {main} thrown in /home/srorg/public_html/collegetalkspot.com/bitly.php on line 193
I've got all the files in the right places, in the root directory. I'm currently running with all plugins disabled, because if i even attempt to delete the plugin and the files then it just throws that error and won't go away...