vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - vBulletin to Twitter, live tweets of new threads (https://vborg.vbsupport.ru/showthread.php?t=234288)

vvdven 03-24-2011 06:25 PM

Hello,

I am getting the same error. I did enter your code on line 136 of bitly.php.

Code:

Warning: curl_setopt_array() [function.curl-setopt-array]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in [path]/twitter.php on line 189
/statuses/update.xml Could not authenticate you. Unauthorized on line 229 in /home/myaccount/domains/myaccount/public_html/twitter.php
#0 /home/myaccount/domains/myaccount/public_html/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /home/myaccount/domains/myaccount/public_html/newthread.php(276) : eval()'d code(26): Twitter->updateStatus('nog een test ye...')
#2 /home/myaccount/domains/myaccount/public_html/newthread.php(276): eval()
#3 /home/myaccount/domains/myaccount/public_html/vbseo.php(1392): require('/home/myaccount/...')
#4 {main}


Warning: Invalid error type specified in [path]/vb/vb.php on line 287

Should I insert the code elsewhere?

EDIT: Just noticed the new version, cheers!

oldengine 04-09-2011 04:06 PM

Quote:

Originally Posted by Videx (Post 2085556)
OMG do you read at all?

YES THIS MOD WILL STOP WORKING 8/30/2010. EVERYONE STOP INSTALLING IT FOR GOD'S SAKE!

Why not simply close the thread?

6MTUA5 04-16-2011 12:15 AM

I installed it just like the directions said and it is not tweeting new threads

I just tried resetting the API Key for bit.ly and tried it again

Jennifer2010 04-16-2011 03:43 AM

Quote:

Originally Posted by Videx (Post 2146035)
Uninstall this version and go to https://vborg.vbsupport.ru/showthrea...=236278&page=7 for the new, working version. Read the thread before installing.

That's a completely different mod. It does not tweet all threads it simply tweets the admin's threads or posts - which IMHO is pretty useless.

The only solution I apparently know of is what was suggested by a previous user and grab the forum's RSS feed and hook it up with TweetFeed or something similar.

todomaquinas 04-23-2011 11:45 PM

I will mark as uninstalled, because does not work with my forum.

vBulletin 4.1.0 versión.

I search for another mod, or if you know for some mod for live tweets, i apreciate if told me about. Thanks...

Videx 04-23-2011 11:54 PM

Quote:

Originally Posted by todomaquinas (Post 2187934)
I will mark as uninstalled, because does not work with my forum.

vBulletin 4.1.0 versi?n.

I search for another mod, or if you know for some mod for live tweets, i apreciate if told me about. Thanks...

https://vborg.vbsupport.ru/showpost....&postcount=559

vivoperdio 05-09-2011 05:05 AM

I got this error:
Code:

Warning: curl_setopt_array() [function.curl-setopt-array]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in [path]/twitter.php on line 189
/statuses/update.xml Could not authenticate you. Unauthorized on line 229 in /home/forum/domains/parisjvanjava.org/public_html/twitter.php
#0 /home/forum/domains/parisjvanjava.org/public_html/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /home/forum/domains/parisjvanjava.org/public_html/newthread.php(276) : eval()'d code(16): Twitter->updateStatus('well done, it's...')
#2 /home/forum/domains/parisjvanjava.org/public_html/newthread.php(276): eval()
#3 /home/forum/domains/parisjvanjava.org/public_html/vbseo.php(1397): require('/home/forum/dom...')
#4 {main}


Warning: Invalid error type specified in [path]/vb/vb.php on line 287

Any help would be gladly appreciated :)

Videx 05-09-2011 02:55 PM

Quote:

Originally Posted by vivoperdio (Post 2193539)
Any help would be gladly appreciated :)

Whenever you install a modification, you must read all the instructions, as well as the entire thread. It looks as if you've done neither, as the answer to this is right there in post #1.
Quote:

Q: I see an error that says "Warning: curl_setopt_array( ...

vivoperdio 05-11-2011 07:07 AM

Quote:

Originally Posted by Videx (Post 2193681)
Whenever you install a modification, you must read all the instructions, as well as the entire thread. It looks as if you've done neither, as the answer to this is right there in post #1.

I have read all the instructions but still not able to get it working.

Videx 05-11-2011 01:02 PM

Quote:

Originally Posted by vivoperdio (Post 2194335)
I have read all the instructions but still not able to get it working.

OMG I'm confused and in the wrong thread. Sorry. But you drove me to it by not reading the post right above yours.

https://vborg.vbsupport.ru/showpost....&postcount=559

cormee 05-12-2011 10:35 AM

Quote:

Originally Posted by fountainmass (Post 2094459)
I just got this working again. It was pretty simple.

First, like with the other mods, you will need to register a new Twitter Application (while logged with your normal Twitter account) - http://dev.twitter.com/apps/new

Note down the "Consumer Key" and "Consumer Secret" (Under App Details) as well as the "Access Token" and "Access Token Secret" (under My Access Token on the App details screen).

Step 1: Download Tijs Verkoyen's new twitter.php file (which supports OAuth) - http://classes.verkoyen.eu/modules/t...tter_2_0_1.zip

Step 2: Edit the file.
  1. add your Access Token to "private $oAuthToken = " (line 88)
  2. add your Access Token Secret to "private $oAuthTokenSecret =" (line 96).

Step 3: Upload it to the root directory of your forum (ie. replace your old twitter.php)

Step 4: Edit your vBulletin module, and change these two lines:

PHP Code:

$twitter = new Twitter('<twitter username>','<twitter password>');
$twitter->updateStatus($tweet); 

to

PHP Code:

$twitter = new Twitter('<Twitter Consumer Key>''<Twitter Consumer Secret>');
$twitter->statusesUpdate($tweet); 

All should be sweet now. :D

At least, it was for me...


That worked for me - thanks v much :)

For the sake of anyone reading this post who is getting errors when they install the plugin, try fountainmass' instructions above. It's slightly difficult but it works.

Alfa1 05-17-2011 05:52 PM

I only want to post new threads to twitter after they have been rated 5 stars. This way only interesting threads are posted to twitter. If I would post all new threads to twitter then my twitterfeed would get hundreds of posts per day. This would be spammy as not all of them would be of interest to twitter followers.

Please consider to add this function.

jackalopejoe 05-19-2011 04:29 AM

Well that was a waste of time... Why don't they graveyard this......


This one however works fine.
https://vborg.vbsupport.ru/showpost....&postcount=559

andycaps 05-20-2011 11:05 AM

Hi Guys,
I have installed all the details as per the instructions and cannot see any tweeted forum posts in my twitter page - I also get no error messages, thus is appears to be ok but cant see the forum threads in twwitter?
thank
Andy

shzad1 06-05-2011 07:49 AM

WOW
Awesome buddy
Great Work

Let me check..... :)

shzad1 06-05-2011 08:26 AM

Everything is OK...
but got this error

Fatal error: Basic authentication is not supported on line 204 in [path]/twitter.php in [path]/vb/vb.php on line 287

Basic authentication is not supported on line 204 in /home/youngsko/public_html/twitter.php
#0 /home/youngsko/public_html/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /home/youngsko/public_html/newthread.php(276) : eval()'d code(26): Twitter->updateStatus('Hijr Ka Taala D...')
#2 /home/youngsko/public_html/newthread.php(276): eval()
#3 {main}

Videx 06-05-2011 11:29 AM

Quote:

Originally Posted by shzad1 (Post 2203705)
WOW
Awesome buddy
Great Work

Let me check..... :)

Check what? If it works or not? Always read the entire thread before you install a modification. Or at the very least the last page.

shzad1 06-07-2011 06:11 AM

Quote:

Originally Posted by shzad1 (Post 2203715)
Everything is OK...
but got this error

Fatal error: Basic authentication is not supported on line 204 in [path]/twitter.php in [path]/vb/vb.php on line 287

Basic authentication is not supported on line 204 in /home/youngsko/public_html/twitter.php
#0 /home/youngsko/public_html/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /home/youngsko/public_html/newthread.php(276) : eval()'d code(26): Twitter->updateStatus('Hijr Ka Taala D...')
#2 /home/youngsko/public_html/newthread.php(276): eval()
#3 {main}




I Got this error
can some 1 tell me how to fix it please :D

Videx 06-07-2011 01:20 PM

Quote:

Originally Posted by shzad1 (Post 2204517)
I Got this error
can some 1 tell me how to fix it please :D

I just told you how to fix it. If you aren't going to read, don't keep asking.

I'll reiterate: Some people have gotten this mod to work with extensive editing. It's in the thread, they aren't going to repeat it all again. But why bother, since there's another mod that works great.

shzad1 06-08-2011 03:58 AM

Quote:

Originally Posted by Videx (Post 2204597)
I just told you how to fix it. If you aren't going to read, don't keep asking.

I'll reiterate: Some people have gotten this mod to work with extensive editing. It's in the thread, they aren't going to repeat it all again. But why bother, since there's another mod that works great.

Thanks Brother ;)

chelseaboy 08-08-2011 09:58 AM

I get this:

Basic authentication is not supported on line 204 in /home/forum/public_html/twitter.php
#0 /home/forum/public_html/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /home/forum/public_html/newthread.php(277) : eval()'d code(26): Twitter->updateStatus('Test http://bit...')
#2 /home/forum/public_html/newthread.php(277): eval()
#3 {main}


Fatal error: Basic authentication is not supported on line 204 in [path]/twitter.php in [path]/vb/vb.php on line 287
#0 vb_error_handler(256, Basic authentication is not supported on line 204 in /home/forum/public_html/twitter.php , /home/forum/public_html/vb/vb.php, 287, Array ([exception] => TwitterException Object ([] => Array ([100] => Continue,[101] => Switching Protocols,[200] => OK,[201] => Created,[202] => Accepted,[203] => Non-Authoritative Information,[204] => No Content,[205] => Reset Content,[206] => Partial Content,[300] => Multiple Choices,[301] => Status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.,[302] => Status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.,[303] => See Other,[304] => Not Modified,[305] => Use Proxy,[306] => (Unused),[307] => Temporary Redirect,[400] => Bad Request,[401] => Unauthorized,[402] => Payment Required,[403] => Forbidden,[404] => Not Found,[405] => Method Not Allowed,[406] => Not Acceptable,[407] => Proxy Authentication Required,[408] => Request Timeout,[409] => Conflict,[411] => Length Required,[412] => Precondition Failed,[413] => Request Entity Too Large,[414] => Request-URI Too Long,[415] => Unsupported Media Type,[416] => Requested Range Not Satisfiable,[417] => Expectation Failed,[500] => Internal Server Error,[501] => Not Implemented,[502] => Bad Gateway,[503] => Service Unavailable,[504] => Gateway Timeout,[505] => HTTP Version Not Supported),[] => Basic authentication is not supported,[] => ,[] => 0,[] => /home/forum/public_html/twitter.php,[] => 204,[] => Array ([0] => Array ([file] => /home/forum/public_html/twitter.php,[line] => 648,[function] => doCall,[class] => Twitter,[type] => ->,[args] => Array ([0] => statuses/update.xml,[1] => Array ([status] => Test http://bit.ly/rhKelq),[2] => 1)),[1] => Array ([file] => /home/forum/public_html/newthread.php(277) : eval()'d code,[line] => 26,[function] => updateStatus,[class] => Twitter,[type] => ->,[args] => Array ([0] => Test http://bit.ly/rhKelq)),[2] => Array ([file] => /home/forum/public_html/newthread.php,[line] => 277,[function] => eval))),[code] => 256)) called at [(null):0] #1 trigger_error(Basic authentication is not supported on line 204 in /home/forum/public_html/twitter.php , 256) called at [/home/forum/public_html/vb/vb.php:287] #2 vB::handleException(TwitterException Object ([] => Array ([100] => Continue,[101] => Switching Protocols,[200] => OK,[201] => Created,[202] => Accepted,[203] => Non-Authoritative Information,[204] => No Content,[205] => Reset Content,[206] => Partial Content,[300] => Multiple Choices,[301] => Status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.,[302] => Status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.,[303] => See Other,[304] => Not Modified,[305] => Use Proxy,[306] => (Unused),[307] => Temporary Redirect,[400] => Bad Request,[401] => Unauthorized,[402] => Payment Required,[403] => Forbidden,[404] => Not Found,[405] => Method Not Allowed,[406] => Not Acceptable,[407] => Proxy Authentication Required,[408] => Request Timeout,[409] => Conflict,[411] => Length Required,[412] => Precondition Failed,[413] => Request Entity Too Large,[414] => Request-URI Too Long,[415] => Unsupported Media Type,[416] => Requested Range Not Satisfiable,[417] => Expectation Failed,[500] => Internal Server Error,[501] => Not Implemented,[502] => Bad Gateway,[503] => Service Unavailable,[504] => Gateway Timeout,[505] => HTTP Version Not Supported),[] => Basic authentication is not supported,[] => ,[] => 0,[] => /home/forum/public_html/twitter.php,[] => 204,[] => Array ([0] => Array ([file] => /home/forum/public_html/twitter.php,[line] => 648,[function] => doCall,[class] => Twitter,[type] => ->,[args] => Array ([0] => statuses/update.xml,[1] => Array ([status] => Test http://bit.ly/rhKelq),[2] => 1)),[1] => Array ([file] => /home/forum/public_html/newthread.php(277) : eval()'d code,[line] => 26,[function] => updateStatus,[class] => Twitter,[type] => ->,[args] => Array ([0] => Test http://bit.ly/rhKelq)),[2] => Array ([file] => /home/forum/public_html/newthread.php,[line] => 277,[function] => eval)))) called at [(null):0]

Videx 08-08-2011 12:02 PM

Quote:

Originally Posted by chelseaboy (Post 2230831)
I get this:

Basic authentication is not supported ...

Well, whatever you do, don't read the entire thread before installing a mod. Or bother searching the thread for a solution before asking. Especially don't read back JUST TWO POSTS for a solution.

edit: Oh and be sure to always quote your entire error. :)

Lester Wilson 08-11-2011 11:28 AM

Any help would be great! Thanks in advance.
(bits in red changed to protect the innocent)

ERROR MESSAGE -
Could not authenticate you. /statuses/update.xml Unauthorized on line 229 in /var/www/vhosts/mydomain.co.uk/httpdocs/twitter.php
#0 /var/www/vhosts/
mydomain.co.uk/httpdocs/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /var/www/vhosts/
mydomain.co.uk/httpdocs/newthread.php(276) : eval()'d code(23): Twitter->updateStatus('Test from Mark ...')
#2 /var/www/vhosts/
mydomain.co.uk/httpdocs/newthread.php(276): eval()
#3 {main}




MY PHP SCRIPT

// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly = true;

if (!in_array($foruminfo[forumid], $excludedForums)) {
$shortUrl = 'http://www.myDomain.co.uk/showthread.php?t='.$newpost[threadid];

if ($useBitly) {
// http://classes.verkoyen.eu/bitly
require_once 'bitly.php';
$bitly = new Bitly('accountName', 'R_70765765765765765765');
$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('accountName','234kjh234k2j3h4');
$twitter->updateStatus($tweet);
}

Qwest 08-12-2011 01:22 PM

Quote:

Originally Posted by jackalopejoe (Post 2197441)
Well that was a waste of time... Why don't they graveyard this......


This one however works fine.
https://vborg.vbsupport.ru/showpost....&postcount=559

YUP! this definitely works.

The direct link to the actual mod is here https://vborg.vbsupport.ru/showthread.php?t=236278

elcoxx 10-08-2011 06:52 PM

Hello, I need to know something.

Can I add Tweet Prefixes (not thread prefixes) With this add-on?

For xample, Tweet:

[Forum] vBulletin, the best forum system bit.ly/TweetURL23

Many thanks.

SpaceStar 10-19-2011 09:48 PM

I have got it working after some googling og different errors.

Thanks for the mod.

mairving 05-25-2012 10:24 PM

Here is the error that I'm getting. Any ideas?

Quote:

Basic authentication is not supported on line 204 in /home/httpd/html/memphisroar.com/public_html/forum/twitter.php
#0 /home/httpd/html/memphisroar.com/public_html/forum/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /home/httpd/html/memphisroar.com/public_html/forum/newthread.php(277) : eval()'d code(26): Twitter->updateStatus('Just added auto...')
#2 /home/httpd/html/memphisroar.com/public_html/forum/newthread.php(277): eval()
#3 {main}


Fatal error: Basic authentication is not supported on line 204 in [path]/twitter.php in [path]/vb/vb.php on line 287
#0 vb_error_handler(256, Basic authentication is not supported on line 204 in /home/httpd/html/memphisroar.com/public_html/forum/twitter.php , /home/httpd/html/memphisroar.com/public_html/forum/vb/vb.php, 287, Array ([exception] => TwitterException Object ([] => Array ([100] => Continue,[101] => Switching Protocols,[200] => OK,[201] => Created,[202] => Accepted,[203] => Non-Authoritative Information,[204] => No Content,[205] => Reset Content,[206] => Partial Content,[300] => Multiple Choices,[301] => Status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.,[302] => Status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.,[303] => See Other,[304] => Not Modified,[305] => Use Proxy,[306] => (Unused),[307] => Temporary Redirect,[400] => Bad Request,[401] => Unauthorized,[402] => Payment Required,[403] => Forbidden,[404] => Not Found,[405] => Method Not Allowed,[406] => Not Acceptable,[407] => Proxy Authentication Required,[408] => Request Timeout,[409] => Conflict,[411] => Length Required,[412] => Precondition Failed,[413] => Request Entity Too Large,[414] => Request-URI Too Long,[415] => Unsupported Media Type,[416] => Requested Range Not Satisfiable,[417] => Expectation Failed,[500] => Internal Server Error,[501] => Not Implemented,[502] => Bad Gateway,[503] => Service Unavailable,[504] => Gateway Timeout,[505] => HTTP Version Not Supported),[] => Basic authentication is not supported,[] => ,[] => 0,[] => /home/httpd/html/memphisroar.com/public_html/forum/twitter.php,[] => 204,[] => Array ([0] => Array ([file] => /home/httpd/html/memphisroar.com/public_html/forum/twitter.php,[line] => 648,[function] => doCall,[class] => Twitter,[type] => ->,[args] => Array ([0] => statuses/update.xml,[1] => Array ([status] => Just added automated Tweeting for threads... http://bit.ly/KTTFfF),[2] => 1)),[1] => Array ([file] => /home/httpd/html/memphisroar.com/public_html/forum/newthread.php(277) : eval()'d code,[line] => 26,[function] => updateStatus,[class] => Twitter,[type] => ->,[args] => Array ([0] => Just added automated Tweeting for threads... http://bit.ly/KTTFfF)),[2] => Array ([file] => /home/httpd/html/memphisroar.com/public_html/forum/newthread.php,[line] => 277,[function] => eval))),[code] => 256)) called at [(null):0] #1 trigger_error(Basic authentication is not supported on line 204 in /home/httpd/html/memphisroar.com/public_html/forum/twitter.php , 256) called at [/home/httpd/html/memphisroar.com/public_html/forum/vb/vb.php:287] #2 vB::handleException(TwitterException Object ([] => Array ([100] => Continue,[101] => Switching Protocols,[200] => OK,[201] => Created,[202] => Accepted,[203] => Non-Authoritative Information,[204] => No Content,[205] => Reset Content,[206] => Partial Content,[300] => Multiple Choices,[301] => Status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.,[302] => Status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.,[303] => See Other,[304] => Not Modified,[305] => Use Proxy,[306] => (Unused),[307] => Temporary Redirect,[400] => Bad Request,[401] => Unauthorized,[402] => Payment Required,[403] => Forbidden,[404] => Not Found,[405] => Method Not Allowed,[406] => Not Acceptable,[407] => Proxy Authentication Required,[408] => Request Timeout,[409] => Conflict,[411] => Length Required,[412] => Precondition Failed,[413] => Request Entity Too Large,[414] => Request-URI Too Long,[415] => Unsupported Media Type,[416] => Requested Range Not Satisfiable,[417] => Expectation Failed,[500] => Internal Server Error,[501] => Not Implemented,[502] => Bad Gateway,[503] => Service Unavailable,[504] => Gateway Timeout,[505] => HTTP Version Not Supported),[] => Basic authentication is not supported,[] => ,[] => 0,[] => /home/httpd/html/memphisroar.com/public_html/forum/twitter.php,[] => 204,[] => Array ([0] => Array ([file] => /home/httpd/html/memphisroar.com/public_html/forum/twitter.php,[line] => 648,[function] => doCall,[class] => Twitter,[type] => ->,[args] => Array ([0] => statuses/update.xml,[1] => Array ([status] => Just added automated Tweeting for threads... http://bit.ly/KTTFfF),[2] => 1)),[1] => Array ([file] => /home/httpd/html/memphisroar.com/public_html/forum/newthread.php(277) : eval()'d code,[line] => 26,[function] => updateStatus,[class] => Twitter,[type] => ->,[args] => Array ([0] => Just added automated Tweeting for threads... http://bit.ly/KTTFfF)),[2] => Array ([file] => /home/httpd/html/memphisroar.com/public_html/forum/newthread.php,[line] => 277,[function] => eval)))) called at [(null):0]

mairving 05-25-2012 10:36 PM

Here is the php I entered in the plug-in with the password and API starred out:

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(7,10,14,16,21,22,27,28,29,30,31,32,33,34,35,36);

// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly true;

if (!
in_array($foruminfo[forumid], $excludedForums)) {
    
$shortUrl 'http://memphisroar.com/forum/showthread.php?t='.$newpost[threadid];

    if (
$useBitly) {
      
// http://classes.verkoyen.eu/bitly
      
require_once 'bitly.php';
      
$bitly = new Bitly('memphisroar''***************************');
      
$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('memphisroar','*************');
    
$twitter->updateStatus($tweet);



Videx 05-25-2012 11:59 PM

Go to the upper right and "search this mod" for the error you're getting. Specifically "Basic authentication is not supported".

mairving 05-26-2012 01:11 AM

Thanks for the help. What it boils down to, essentially, is that this mod is a piece of crap. Right? LOL

DAMINK 05-26-2012 01:24 AM

Quote:

Originally Posted by mairving (Post 2332919)
Thanks for the help. What it boils down to, essentially, is that this mod is a piece of crap. Right? LOL

Works for me without an issue and im on 4.2.0 so honestly no i would have to disagree.

mairving 05-26-2012 01:30 AM

I know. It was a little sarcasm. Videx seems to have a strong distaste with this mod (and maybe for people like me that don't read all 40 pages of the thread).

grunty1 06-15-2012 02:46 PM

Hey mairving I encountered the same problem at first! The solution is that in the array you need to break up the numbers.

I.e. instead of "1,2,3,4"

it should be "1, 2, 3, 4"

That fixed it for me.

cuco88 06-18-2012 12:51 PM

I tried this with my 4.2.0-board. It didn't work, the bit.ly-thing threw out errors. After fixing that the twitter-thing threw out other and more complicated errors. I tried to fix it and I got it working. But many changes were needed. I try to tell you:

At first, don't use the attached bitly.php. Use the linked one in the first posting. Or take this link:
http://classes.verkoyen.eu/bitly
unzip it, place it in the forum-root

Second: the twitter-API only accepts oAuth now, no basic username/password authentication anymore. So you have to use the new twitter.php. Don't use the one attached to the first posting. And don't use the one linked in the first posting. Use this one instead: http://classes.verkoyen.eu/twitter_oauth
unzip it. Don't place it in the forum root now! We have to edit it!

Now you have to get a legacy-API-key from bit.ly: https://bitly.com/a/settings/advanced
And you need oAuth-data from twitter. Use this link: https://dev.twitter.com/ then click on "my applications" in the menu on the upper right. Click on "create new application" and enter your data. (you don't need to enter a callback-url) Then your app is created. Click on "settings" and then switch to "Read, Write and Access direct messages". Update application settings. Go back on the "details"-tab and click on "create my access-token". Go to tab "oAuth tool" You will see four keys now. You need all of them. Open your twitter.php, search for "private $oAuthToken = ' ';" Place the "Access token" here. Then search for "private $oAuthTokenSecret = ' ';" Place your "Aceess token secret" between the ' ' here. Now save the file and upload it to your forum root. The other two codes (consumer key, consumer secret) are needed in the plugin-script, see below.

Go to plugin-manager and create a new plugin:
vBulletin
newthread_post_complete
Tweet to Twitter

Now use the following code
If you want to exclude some forums, edit this line:
$excludedForums = array(1, 2);
and place the forum-ids between the brackets. use array() if you don't want to exclude any forums.

this line:
$shortUrl = 'http://yourURLhere.com/showthread.php?t='.$newpost[threadid];
change "YourURLhere.com" to your forum-URL.

In this line:
$bitly = new Bitly('username', 'API_key');
you have to put in your bit.ly-username and the generated API-key.

And in this line:
$twitter = new Twitter('consumer-key','consumer-secret');
you have to put in the consumer-key and the consumer-secret from the twitter o-auth-tool.


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(12);

// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly true;

if (!
in_array($foruminfo[forumid], $excludedForums)) {
    
$shortUrl 'http://yourURLhere.com/showthread.php?t='.$newpost[threadid];

    if (
$useBitly) {
      
// http://classes.verkoyen.eu/bitly
      
require_once 'bitly.php';
      
$bitly = new Bitly('username''API_key');
      
$result_bit = array();
      
$result_bit $bitly->shorten($shortUrl);
      
$shortUrl $result_bit['url'];
    }

    
$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('consumer-key','consumer-secret');
    
$twitter->statusesUpdate($tweet);


Save and activate it. This worked for me :-) No curl-erros anymore, no "unauthorized access" errors anymore, no .... errors, just working :)

nyenius 06-23-2012 08:03 AM

cuco88 thanks in advance for your post, but i've followed all your steps and ends up with this kind of message:

------WebKitFormBoundary*******************--

why is that?

**im using vb4.2

cuco88 06-23-2012 09:15 AM

Where do you get this message? Does the forum work or do you only get this message?

And does the plugin do anything? Is there a shortened link when you login to your bit.ly-account? Is there a tweet on Twitter?

If found a bug in the Twitter.php when using Unicode values with more than 1 byte, I have an easy fix for that, but I don't think this is the problem. Or are you using non english characters? Like ä ö ü é â, ...?

nyenius 06-23-2012 10:16 AM

Right afer I submitted new thread. It just shows these lines and blank white screen.

The thread submitted correctly, but there's nothing new appears on bitly or twitter.

I not using non-english character either. I just copy-pasted the cde, that's all.

cuco88 06-23-2012 10:43 AM

Looks like a problem with JSON. This can happen with the bitly.php. Try set
$useBitly = true;
to
$useBitly = false;

nyenius 06-23-2012 04:05 PM

first time I encountered this error, it was the bitly disabled. then I enabled it, still the same message. Is it the hosting configuration?

Videx 06-23-2012 05:22 PM

The problem is you're trying to use a mod that hasn't worked in a long time. Presumably because you neglected to read back a few posts and discover this fact. This is vital, especially when you can see from post #1 that the author hasn't been around for ages.

You can keep playing around trying to get this one to work, or you can just go use one that does: WS vBulletin Tweet Poster


All times are GMT. The time now is 04:57 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02169 seconds
  • Memory Usage 1,943KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete