View Full Version : Miscellaneous Hacks - vBulletin to Twitter, live tweets of new threads
steeler7
02-18-2010, 04:33 PM
I've been really surprised at the number of people posting about issues with Bit.ly. It took me all of five minutes to set up my account with them and get that working. I've had many more issues with the mod itself.
For example, it doesn't check to see if the title of a thread exceeds the 140 character length allowed for a tweet -- this causes an Exception error to be thrown that's not captured and handled anywhere -- which is fine for a programmer ,but doesn't really help an end user when they see a screen dump of gobbledygook in response to submitting a thread with a long title.
:/
Was there something that needed to be done at bit.ly that I missed? Threads from my board are going to bit.ly and can be seen on the "home" section of my account. If I click "share" it'll send it to my Twitter account with no problems... I obviiously have the Twitter account set up at bit.ly or I wouldn't be able to share it.... It seems like there's something that's not having it automatically go to Twitter.
sqzdog
02-18-2010, 04:45 PM
I am missing the response, or the author has not responded.
My board is not a heavy use board so I want to be able to tweet EVERY POST, not just new threads.
Can this be done?
sqzdog
02-18-2010, 04:49 PM
Steeler7, did you check to make sure you included your twitter url in the plugin you created?
steeler7
02-18-2010, 06:07 PM
Steeler7, did you check to make sure you included your twitter url in the plugin you created?
Here's my code... I've looked over it a bunch of times maybe you can see something I screwed up...
// 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(1,2,3,35,36,37,38,39,40,43);
// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly = true;
if (!in_array($foruminfo[forumid], $excludedForums)) {
$shortUrl = 'http://www.pittsburghsportstavern.com/forum/showthread.php?t='.$newpost[threadid];
if ($useBitly) {
// http://classes.verkoyen.eu/bitly
require_once 'bitly.php';
$bitly = new Bitly('kipper51', '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('pghsportstavern','********');
$twitter->updateStatus($tweet);
}
sqzdog
02-18-2010, 06:25 PM
Yours looks identical to mine except for the forum exclusions. I put a space after each comma. Don't know if that would even affect it.
Pro-eSports.com
02-18-2010, 07:06 PM
Do I have to enter the sub-forum ID's too or are the main forum ID's enough?
Do category ID's work too?
I also have another question. I only want to tweet a few of my forums, is there a code that instead of the excluded forums I can enter the included forums? Would be easier for a site with many forums.
steeler7
02-18-2010, 07:18 PM
does this need a specific version of php? Im using 5.1.6 and couldn't use the Tweet Poster mod because it required php 5.2.3 or higher.
just curious
Majora
02-18-2010, 07:21 PM
what do I have to insert after
// loop parameters and add them to the queryString
foreach($aParameters as $key => $value) $queryString .= '&'. $key .'='. urlencode(utf8_encode($value));
to rewrite ??? etc...
Best regards,
Majora
sqzdog
02-18-2010, 07:24 PM
does this need a specific version of php? Im using 5.1.6 and couldn't use the Tweet Poster mod because it required php 5.2.3 or higher.
just curious
I don't know. I'm running 5.2.8
steeler7
02-18-2010, 07:41 PM
just curious
I don't know. I'm running 5.2.8
Hmmm...
anyone else running php 5.1.6 or lower? I'm talking with my host to upgrade but they said something about conflicts with plesk being an issue (I think they're trying to scare me off from forcing them to do work..lol)
Pro-eSports.com
02-18-2010, 07:48 PM
I got this error message after submitting a thread:
Warning: curl_setopt_array() [function.curl-setopt-array]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in [path]/bitly.php on line 141
{ "errorCode": 0, "errorMessage": "", "results": { "http://www.pro-esports.com/showthread.php?t=22": { "hash": "d6TEBY", "shortCNAMEUrl": "http://bit.ly/cn4qlP", "shortKeywordUrl": "", "shortUrl": "http://bit.ly/cn4qlP", "userHash": "cn4qlP" } }, "statusCode": "OK" }Invalid JSON-response on line 196 in /.../pro-esports.com/forums/bitly.php
#0 /.../pro-esports.com/forums/bitly.php(382): Bitly->doCall('shorten', Array)
#1 /.../pro-esports.com/forums/newthread.php(262) : eval()'d code(19): Bitly->shorten('http://www.pro-...')
#2 /.../pro-esports.com/forums/newthread.php(262): eval()
#3 {main}
Fatal error: Invalid JSON-response on line 196 in [path]/bitly.php in [path]/vb/vb.php on line 284
#0 vb_error_handler(256, Invalid JSON-response on line 196 in /.../pro-esports.com/forums/bitly.php , /.../pro-esports.com/forums/vb/vb.php, 284, Array ([exception] => BitlyException Object ([] => Invalid JSON-response,[] => ,[] => 0,[] => /.../pro-esports.com/forums/bitly.php,[] => 196,[] => Array ([0] => Array ([file] => /.../pro-esports.com/forums/bitly.php,[line] => 382,[function] => doCall,[class] => Bitly,[type] => ->,[args] => Array ([0] => shorten,[1] => Array ([longUrl] => http://www.pro-esports.com/showthread.php?t=22,[history] => 1))),[1] => Array ([file] => /.../pro-esports.com/forums/newthread.php(262) : eval()'d code,[line] => 19,[function] => shorten,[class] => Bitly,[type] => ->,[args] => Array ([0] => http://www.pro-esports.com/showthread.php?t=22)),[2] => Array ([file] => /.../pro-esports.com/forums/newthread.php,[line] => 262,[function] => eval))),[code] => 256)) #1 trigger_error(Invalid JSON-response on line 196 in /.../pro-esports.com/forums/bitly.php , 256) called at [/.../pro-esports.com/forums/vb/vb.php:284] #2 vB::handleException(BitlyException Object ([] => Invalid JSON-response,[] => ,[] => 0,[] => /.../pro-esports.com/forums/bitly.php,[] => 196,[] => Array ([0] => Array ([file] => /.../pro-esports.com/forums/bitly.php,[line] => 382,[function] => doCall,[class] => Bitly,[type] => ->,[args] => Array ([0] => shorten,[1] => Array ([longUrl] => http://www.pro-esports.com/showthread.php?t=22,[history] => 1))),[1] => Array ([file] => /.../pro-esports.com/forums/newthread.php(262) : eval()'d code,[line] => 19,[function] => shorten,[class] => Bitly,[type] => ->,[args] => Array ([0] => http://www.pro-esports.com/showthread.php?t=22)),[2] => Array ([file] => /.../pro-esports.com/forums/newthread.php,[line] => 262,[function] => eval))))
I got rid of the red code after changing from "true" to "false". The first error message is a problem which you explained in your mod post but I don't know where to add the code from there. It says on line 136 but the code only has about 30 lines. :S
steeler7
02-19-2010, 01:31 AM
Ok... I had my host upgrade my PHP. I'm now running 5.2.12 . I have curl, json enabled, I have Mcrypt (which was a requirement for another twitter mod)..
This is what I get now when I post a thread...
{ "errorCode": 0, "errorMessage": "", "results": { "http://www.pittsburghsportstavern.com/forum/showthread.php?t=3106": { "hash": "ccJT9V", "shortCNAMEUrl": "http://bit.ly/d5LAZT", "shortKeywordUrl": "", "shortUrl": "http://bit.ly/d5LAZT", "userHash": "d5LAZT" } }, "statusCode": "OK" }
That code is now on the white screen. Post still goes through on the forum, makes its way to Bit.ly, doesn't get to Twitter
Pro-eSports.com
02-19-2010, 12:40 PM
For some reason I still get this error after adding the code on line 136 in the bitly.php file.
Warning: curl_setopt_array() [function.curl-setopt-array]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in [path]/bitly.php on line 141
{ "errorCode": 0, "errorMessage": "", "results": { "http://www.pro-esports.com/showthread.php?t=22": { "hash": "d6TEBY", "shortCNAMEUrl": "http://bit.ly/cn4qlP", "shortKeywordUrl": "", "shortUrl": "http://bit.ly/cn4qlP", "userHash": "cn4qlP" } }, "statusCode": "OK" }Invalid JSON-response on line 196 in /.../pro-esports.com/forums/bitly.php
#0 /.../pro-esports.com/forums/bitly.php(382): Bitly->doCall('shorten', Array)
#1 /.../pro-esports.com/forums/newthread.php(262) : eval()'d code(19): Bitly->shorten('http://www.pro-...')
#2 /.../pro-esports.com/forums/newthread.php(262): eval()
#3 {main}
sqzdog
02-20-2010, 03:28 AM
Steelers7 and others- I have deleted this mod and installed a new one that was just released here: https://vborg.vbsupport.ru/showthread.php?t=236278
Much easier to configure and lets you tweet post replies as well. I set it up on my 2 sites with no problems. If you need help, let me know.
-Gary
Xboxinsider
02-21-2010, 05:17 PM
Is there anyway to make it put some like "New forum thread:" before each twitter post? I find im loosing follows, probably because they think it's spam? Cheers! Otherwise, it's a great mod!
Bob_R
02-21-2010, 05:27 PM
Any way to get replies to be tweeted?
pericolosogr
02-23-2010, 06:56 AM
Tried everything went many times through the thread, everything is enabled from my servers side, kept getting JSON issues and then twitter auth problems!
Uninstalled and total waste of time for me!
Oasismad
02-23-2010, 10:58 AM
is there anyway of adding a #hashtag prefix so that
Barnsley FC v Blackpool 27/02/2010 Match Thread - http://bit.ly/bD0SKL #Barnsley Football Club etc
masons
02-23-2010, 02:04 PM
I got all working, no errors!
but..
No tweets! So I guess not all working after all!
Videx
02-25-2010, 03:37 PM
Well, I finally got around to hacking the heck out of it and here's my version that uses is.gd instead of bit.ly (which I could never get to work). A shame there isn't some way to test this besides LIVE.
// 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(0);
if (!in_array($foruminfo[forumid], $excludedForums)) {
$myUrl = 'http://www.myforum.com/forum/showthread.php?t='.$newpost[threadid];
$cURL_resource = curl_init();
curl_setopt($cURL_resource, CURLOPT_URL, 'http://is.gd/api.php?longurl=' . $myUrl);
curl_setopt($cURL_resource, CURLOPT_RETURNTRANSFER, 1);
$shortUrl = curl_exec($cURL_resource);
curl_close($cURL_resource);
$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','MyTwitterPassword');
$twitter->updateStatus($tweet);
}
Vanjezi
02-25-2010, 05:09 PM
Respect! 5 stars, works just great :)
Well, I finally got around to hacking the heck out of it and here's my version that uses is.gd instead of bit.ly (which I could never get to work). A shame there isn't some way to test this besides LIVE.
// 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(0);
if (!in_array($foruminfo[forumid], $excludedForums)) {
$myUrl = 'http://www.myforum.com/forum/showthread.php?t='.$newpost[threadid];
$cURL_resource = curl_init();
curl_setopt($cURL_resource, CURLOPT_URL, 'http://is.gd/api.php?longurl=' . $myUrl);
curl_setopt($cURL_resource, CURLOPT_RETURNTRANSFER, 1);
$shortUrl = curl_exec($cURL_resource);
curl_close($cURL_resource);
$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','MyTwitterPassword');
$twitter->updateStatus($tweet);
}
It is great you could get it to work with is.gd using code you lifted directly out of my vBulletin2Twitter hack, so please do not claim credit for something you did not code.
Videx
02-25-2010, 07:45 PM
I'm not a coder, but after hacking away with these two mods I finally got one that works for me. I made no claim to credit for anything, nor am I suggesting anyone should use mine.
Fact is, if you can fix yours I prefer the add-on approach to doing this tedious manual code mangling, so I'll probably try it again. Especially if you add some bells and whistles like forum names and summaries.
rrudeboy
03-03-2010, 08:01 PM
no error.... and no tweet, anywhere (log) i can trouble shoot this ?
take that back, i replied on the forum and got this error:
Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /hsphere/local/home/roeiboot/totalsmartphone.net/forum/bitly.php on line 34
<strike>thought the plugin would only work on NEW posts, not replies..</strike>
i had setup the incorrect Hook Location, fixed that but still get the same error..
rrudeboy
03-04-2010, 11:00 AM
this thread is no longer active ? :confused:
ikastara
03-05-2010, 02:40 AM
works fine !
thanks you very much!
loving this :)
GafferSports
03-07-2010, 03:05 PM
Superb!
Working for me after I double checked my edits in the PHP - top work
necie_r
03-07-2010, 06:16 PM
Very easy instructions. I downloaded, installed and configured it in minutes! And then I tested it. Works like a breeze! :D
GafferSports
03-07-2010, 07:24 PM
One think I would like to see is this being compatible with RSS Feed threads, which it does not seem to be able to do at the moment
zeroality
03-09-2010, 05:09 AM
This one (https://vborg.vbsupport.ru/showthread.php?t=236278) is better, simple product import.
how to fix this :(:(:(
{ "errorCode": 0, "errorMessage": "", "results": { "http://www.forums.emonx.com/showthread.php?t=16449": { "hash": "bHseVJ", "shortCNAMEUrl": "http://bit.ly/cN24Pk", "shortKeywordUrl": "", "shortUrl": "http://bit.ly/cN24Pk", "userHash": "cN24Pk" } }, "statusCode": "OK" }Invalid JSON-response on line 196 in /home/admin/emonx.com/forum/bitly.php
#0 /home/admin/emonx.com/forum/bitly.php(382): Bitly->doCall('shorten', Array)
#1 /home/admin/emonx.com/forum/newthread.php(262) : eval()'d code(14): Bitly->shorten('http://www.foru...')
#2 /home/admin/emonx.com/forum/newthread.php(262): eval()
#3 {main}
Fatal error: Invalid JSON-response on line 196 in [path]/bitly.php in [path]/vb/vb.php on line 284
#0 vb_error_handler(256, Invalid JSON-response on line 196 in /home/admin/emonx.com/forum/bitly.php , /home/admin/emonx.com/forum/vb/vb.php, 284, Array ([exception] => BitlyException Object ([] => Invalid JSON-response,[] => ,[] => 0,[] => /home/admin/emonx.com/forum/bitly.php,[] => 196,[] => Array ([0] => Array ([file] => /home/admin/emonx.com/forum/bitly.php,[line] => 382,[function] => doCall,[class] => Bitly,[type] => ->,[args] => Array ([0] => shorten,[1] => Array ([longUrl] => http://www.forums.emonx.com/showthread.php?t=16449,[history] => 1))),[1] => Array ([file] => /home/admin/emonx.com/forum/newthread.php(262) : eval()'d code,[line] => 14,[function] => shorten,[class] => Bitly,[type] => ->,[args] => Array ([0] => http://www.forums.emonx.com/showthread.php?t=16449)),[2] => Array ([file] => /home/admin/emonx.com/forum/newthread.php,[line] => 262,[function] => eval))),[code] => 256)) called at [(null):0] #1 trigger_error(Invalid JSON-response on line 196 in /home/admin/emonx.com/forum/bitly.php , 256) called at [/home/admin/emonx.com/forum/vb/vb.php:284] #2 vB::handleException(BitlyException Object ([] => Invalid JSON-response,[] => ,[] => 0,[] => /home/admin/emonx.com/forum/bitly.php,[] => 196,[] => Array ([0] => Array ([file] => /home/admin/emonx.com/forum/bitly.php,[line] => 382,[function] => doCall,[class] => Bitly,[type] => ->,[args] => Array ([0] => shorten,[1] => Array ([longUrl] => http://www.forums.emonx.com/showthread.php?t=16449,[history] => 1))),[1] => Array ([file] => /home/admin/emonx.com/forum/newthread.php(262) : eval()'d code,[line] => 14,[function] => shorten,[class] => Bitly,[type] => ->,[args] => Array ([0] => http://www.forums.emonx.com/showthread.php?t=16449)),[2] => Array ([file] => /home/admin/emonx.com/forum/newthread.php,[line] => 262,[function] => eval)))) called at [(null):0]
Videx
03-10-2010, 05:06 PM
how to fix this :(:(:(
Invalid JSON-response on linePlease refer to post #1 in this thread.
Q: I see an "INVALID_JSON" error
A: Disable bitly by setting $useBitly to false.
@ Videx
now this comes
/statuses/update.xml Could not authenticate you. Unauthorized on line 229 in /home/admin/emonx.com/forum/twitter.php
#0 /home/admin/emonx.com/forum/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /home/admin/emonx.com/forum/newthread.php(262) : eval()'d code(26): Twitter->updateStatus('tgerrrrrrrrrree...')
#2 /home/admin/emonx.com/forum/newthread.php(262): eval()
#3 {main}
It was working fine when i was on Shared hosting now on VPS it doesnt works :(
Videx
03-10-2010, 10:36 PM
"Could not authenticate you" (with Twitter) is going to be more difficult. Look back through the thread and you'll see others with the problem, and they don't seem to have had a lot of luck solving it.
Globus
03-11-2010, 05:47 AM
Hello everyone!
First, buro9 Thank You for the great plugin you have done for the public and been so good in replying to our not so smart questions! :)
However, i was not able to get it going from the first kick! After reading about 12 pages of this thread and trying everything possible I Got IT going.
The working conditions(in my case) are:
vB 4.0.2
vBSEO 3.5: Custom URLs
Charset: UTF-8 ( Russian)
User details: correct
CURL: installed.
JSON: enabled.
Safe_Mode: off
bitly.php CURL options:
// set options
$options[CURLOPT_URL] = $url;
$options[CURLOPT_PORT] = self::API_PORT;
$options[CURLOPT_USERAGENT] = $this->getUserAgent();
$options[CURLOPT_FOLLOWLOCATION] = false;
$options[CURLOPT_HEADER] = false;
$options[CURLOPT_RETURNTRANSFER] = true;
$options[CURLOPT_TIMEOUT] = (int) $this->getTimeOut();
tweeter.php CURL options:
// set options
$options[CURLOPT_URL] = $url;
$options[CURLOPT_PORT] = self::TWITTER_API_PORT;
$options[CURLOPT_USERAGENT] = $this->getUserAgent();
$options[CURLOPT_FOLLOWLOCATION] = false;
$options[CURLOPT_RETURNTRANSFER] = true;
$options[CURLOPT_TIMEOUT] = (int) $this->getTimeOut();
Hope it helps somebody.
All the best!
Budget101
03-11-2010, 04:47 PM
I'm not a coder, but after hacking away with these two mods I finally got one that works for me. I made no claim to credit for anything, nor am I suggesting anyone should use mine.
Well, First KUDOS to you Videx, If you were close buy I'd buy you a CASE of Beer. I tried the original code here and no matter WHAT I did bit.ly would NOT work. Then I went over and downloaded vBulletin2Twitter and that didn't work either. 6 1/2 hours of tweaking, reading tons of posts and signing up to a "support" forum only to find out that you have to Pay for help on the "hacks", I finally discovered your post and gave it a go. It's working wonderfully.
Thank you - Thank You - Thank you.
Videx
03-11-2010, 05:08 PM
only to find out that you have to Pay for help on the "hacks"Actually, let's wish the guy the best of luck. Every day I see people post "I'll pay to get this or that". Well, Mosh seems to know his way around this code (unlike myself), so now is the time to support his endeavors. I'm sure he will only make this mod better, and god knows I couldn't have gotten mine working at all if not for him.
123LearnToTrade
03-11-2010, 06:18 PM
If I have an RSS feed I am importing and it is posting a new thread with the RSS feed info in it, for some reason this does not post that thread to twitter. Is there a way to modify this?
jwood01
03-11-2010, 06:38 PM
Installed and operational in 7 minutes following the directions, including remembering my twitter password.
Thank you for doing this for the community.
"Could not authenticate you" (with Twitter) is going to be more difficult. Look back through the thread and you'll see others with the problem, and they don't seem to have had a lot of luck solving it.
I would prefer waiting you to build up a mod, That fix all the problems like that. I wasted so many hours to get it work. Your 3.8.X product was great. While the Owner of this Mod is sleeping...
Videx
03-12-2010, 07:24 PM
Your 3.8.X product was great. You have me confused with someone else. I have never released a product and can barely code "Hello World!" in HTML.
You can try the other tweet mod vBulletin2Twitter (https://vborg.vbsupport.ru/showthread.php?t=236278) , but since it sounds like a server issue I doubt that will work for you either. However, that mod's author charges for support, so if you pay the fee you may be able to talk him into logging into your server and looking around for a solution. You'll have to trust him with your server credentials for that.
You have me confused with someone else. I have never released a product and can barely code "Hello World!" in HTML.
You can try the other tweet mod vBulletin2Twitter (https://vborg.vbsupport.ru/showthread.php?t=236278) , but since it sounds like a server issue I doubt that will work for you either. However, that mod's author charges for support, so if you pay the fee you may be able to talk him into logging into your server and looking around for a solution. You'll have to trust him with your server credentials for that.
Oh sorry man, I thought you made that haha anyways :) sorry
123LearnToTrade
03-16-2010, 01:53 PM
If I have an RSS feed I am importing and it is posting a new thread with the RSS feed info in it, for some reason this does not post that thread to twitter. Is there a way to modify this?
Videx
03-16-2010, 03:57 PM
If I have an RSS feed I am importing and it is posting a new thread with the RSS feed info in it, for some reason this does not post that thread to twitter. Is there a way to modify this?Not easily. Somewhere buried in all the threads about automatic posters is the fact that they use a different hook or something to do their posting, so it bypasses these mods. This could change in a future version of vb4, or someone may figure out a way around it eventually.
MrCookie
03-23-2010, 10:01 AM
Hi Guys,
sorry for my bad english. Thx for this hack but i have a Problem:
I insert this php code in my Plug in:
// 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(0);
// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly = false;
if (!in_array($foruminfo[forumid], $excludedForums)) {
$shortUrl = 'http://www.MeineDomain.de/showthread.php?t='.$newpost[threadid];
if ($useBitly) {
// http://classes.verkoyen.eu/bitly
require_once 'bitly.php';
$bitly = new Bitly('<bit.ly username>', '<bit.ly API key>');
$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('BlaBlaBla','BlaBlaBla');
$twitter->updateStatus($tweet);
and the system tell me :
Parse error: syntax error, unexpected $end in /var/www/web1/html/newthread.php(262): eval()'d code on line 27
Is the php Code wrong or What?s the problem?
Videx
03-23-2010, 08:00 PM
Is the php Code wrong or What?s the problem?I'm not going to study the entire thing, but it looks like you have at least left out the closing bracket. Thus, the code tries to continue on into the next module, throwing that 'unexpected end' error.
captainslater
03-24-2010, 11:11 AM
I get this error message:
Fatal error: Uncaught exception 'BitlyException' with message 'H' in /var/www/vhosts/hogwarts-forum.de/httpdocs/bitly.php:201 Stack trace: #0 /var/www/vhosts/hogwarts-forum.de/httpdocs/bitly.php(390): Bitly->doCall('shorten', Array) #1 /var/www/vhosts/hogwarts-forum.de/httpdocs/newthread.php(273) : eval()'d code(14): Bitly->shorten('http://www.hogw...') #2 /var/www/vhosts/hogwarts-forum.de/httpdocs/newthread.php(273): eval() #3 {main} thrown in /var/www/vhosts/hogwarts-forum.de/httpdocs/bitly.php on line 201
What have I done wrong?
munsonfan15
03-24-2010, 08:06 PM
Seems to work great - installed
Videx
03-25-2010, 01:15 AM
What have I done wrong?Probably nothing, it's a server error. Perhaps, like many of us, you simply cannot use bitly.
ps2wiz
03-25-2010, 03:44 AM
Thanks, I set it up and it's working great so far.
But, will this work on a 3.7 forum too?
captainslater
03-25-2010, 04:58 AM
Probably nothing, it's a server error. Perhaps, like many of us, you simply cannot use bitly.
Maybe but disabling the bitly function leads to another DB-error :/
Videx
03-25-2010, 11:17 AM
Maybe but disabling the bitly function leads to another DB-error :/Then you really must read through the entire thread a few mores times. It's unlikely you're getting errors that others haven't already gotten. If worse comes to worse, use the hacked version I posted a while back.
My server behind an cisco ASA and IPS firewall. So i received an empty call from the twitter. I have to whitelist twitter.com ip address.
"empty reply from server on line"
WOWOWOWOWOOWOWO It worked for me :D don't know how it worked Hulaaaaaaaay!
IsMaR
03-27-2010, 07:23 PM
Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /home/soicey/public_html/bitly.php on line 139
Hm... Guessing I need to enable curl?
RedPitSea
03-28-2010, 03:03 AM
It works for me too. TheLoboLair twitter feed. We run about 100 new threads a day. The guests aka bots and spiders on the site all day is ridiculous. lol
kefallon
03-28-2010, 05:33 AM
Not looked in on this thread recently, anyone manged to sort out the server issue with this error message??
tatuses/update.xml Could not authenticate you. Unauthorized on line 229 in /var/www/vhosts/ionian-island.co.uk/httpdocs/forums/twitter.php
#0 /var/www/vhosts/ionian-island.co.uk/httpdocs/forums/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /var/www/vhosts/ionian-island.co.uk/httpdocs/forums/newthread.php(262) : eval()'d code(26): Twitter->updateStatus('test http://www...')
#2 /var/www/vhosts/ionian-island.co.uk/httpdocs/forums/newthread.php(262): eval()
#3 {main}
Manoel J?nior
03-28-2010, 09:44 PM
How do I work with vBulletin?
IsMaR
03-29-2010, 12:44 AM
^sorry it only works with phpnuke, since this is a phpnuke forum...
bigtree
03-29-2010, 12:52 AM
rocking!
vb 4.0.2.pl4 is perfect.
only issue I had was the need to go into my http://bit.ly/ account and setup the link for twitter.
Cheers!
milaszewski
03-31-2010, 03:15 PM
Polish characters are displaying incorrectly. Any way of solving it? Please take a look: www.twitter.com/dzwiek
I use iso-8859-2 coding
GamerPerfection
03-31-2010, 06:41 PM
After several hours of messing around with this i finally got it working.
// If you are having trouble getting bitly URL shortening to work... disable it!
basically I got it working by disabling the bitly url.
Can I just ask why have bitly url if it works when disabling it?
Also after reading through every page of this thread and several people have said you need CURL and JSON installed and enabled for it to work then isn't it better for you to mention that in the opening post?
does this work with automated posts via an extrernal rss feed?
i've done a test post which worked, but my forum has automated threads from an rss feed which dont get posted to twitter despite them still being new threads.
Videx
04-01-2010, 03:32 PM
does this work with automated posts via an extrernal rss feed?No I don't beleive so. Ditto Event Forum posts. Seems these use a different posting method. Besides, would it even be ethical to echo someone else's RSS feed to your Twitter?
bransworld
04-02-2010, 10:26 PM
Works Great! Thanks!!
bransworld
04-02-2010, 10:39 PM
Is there anything like this for Facebook?
vbreal
04-03-2010, 05:51 PM
// 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(28,72,74,88,26,81,62,25,40);
// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly = false;
if (!in_array($foruminfo[forumid], $excludedForums)) {
$shortUrl = 'http://www.trulyfe.com/showthread.php?t='.$newpost[threadid];
if ($useBitly) {
// http://classes.verkoyen.eu/bitly
require_once 'bitly.php';
$bitly = new Bitly('trulyfe', 'R_3798ebe20e93bcd8f6f2adccae0bef8f ');
$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('trulyfeforum','pass');
$twitter->updateStatus($tweet);
}
this is what im using but its not authenticating with bitly. any idea why
Videx
04-03-2010, 06:02 PM
First, it says "use bitly=false". Second, you have a space in your bitly key.
hiker
04-08-2010, 02:00 AM
I'm not able to authenticate. I've turned bitly off because I thought that was the problem, but no, so you'll see bitly=false right now.
My test forum is bogley.com/4.0. I've dropped the bitly.php and twitter.php files in the 4.0 folder. I don't need to edit those do I?
Here's what I see right after I submit a thread titled "Twitter Testing..."
/statuses/update.xml Could not authenticate you. Unauthorized on line 229 in /var/www/vhosts/bogley.com/httpdocs/4.0/twitter.php
#0 /var/www/vhosts/bogley.com/httpdocs/4.0/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /var/www/vhosts/bogley.com/httpdocs/4.0/newthread.php(262) : eval()'d code(26): Twitter->updateStatus('twitter testing...')
#2 /var/www/vhosts/bogley.com/httpdocs/4.0/newthread.php(262): eval()
#3 {main}
Here's what my code looks like:
Plugin 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(47, 37, 48, 49, 50, 45, 46);
// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly = false;
if (!in_array($foruminfo[forumid], $excludedForums)) {
$shortUrl = 'http://www.bogley.com/4.0/showthread.php?t='.$newpost[threadid];
if ($useBitly) {
// http://classes.verkoyen.eu/bitly
require_once 'bitly.php';
$bitly = new Bitly('bogley', 'R_e1602345ef71fdad93ecc8cb71232888');
$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('TWITTERACCOUNT','TWITTERPASS');
$twitter->updateStatus($tweet);
}
(twitter acct & password substituted)
I'm very eager to get this mod working. Thanks.
Videx
04-08-2010, 02:22 AM
I have yet to see any really good reason (or solution) to why Twitter refuses to authenticate some people. It must be a server issue, but I haven't seen a solution.
Perhaps try opening a ticket at your host? Maybe do it late one night when they have nothing else to do and be sure to phrase it nicely and mark it as a low priority so they don't just fly off the handle and tell you to get lost.
Then again, perhaps some of the people having Twitter auth problems solved it but forgot to post back and tell us what the trouble was?
hiker
04-08-2010, 12:32 PM
I have yet to see any really good reason (or solution) to why Twitter refuses to authenticate some people. It must be a server issue, but I haven't seen a solution.
So that's pretty much what it is, that Twitter is not authenticating the post? OK, thanks for the reply. :)
EDIT - OK I changed my twitter account to a different one that has been in use for a couple of years, made a test thread, and received this:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Invalid at the top level of the document. Error processing resource 'http://www.bogley.com/4.0/newthread.php?do=postthread&...
</hash>
This was on IE8
Videx
04-08-2010, 12:48 PM
Who knows. That all sounds like some sort of style issue. Are you using the default vb style? If not, you may have to revert to it at least for testing.
nervous
04-08-2010, 10:03 PM
// 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(18, 19, 23, 37);
// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly = true;
if (!in_array($foruminfo[forumid], $excludedForums)) {
$shortUrl = 'http://www.babaforum.com/showthread.php?t='.$newpost[threadid];
if ($useBitly) {
// http://classes.verkoyen.eu/bitly
require_once 'bitly.php';
$bitly = new Bitly('BitlyName', 'BitlyAPiKey');
$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('Twitteracc','TwitterPass');
$twitter->updateStatus($tweet);
}
This is my Plugin Code.But not working.Do you see any mistake?
Not: i didn't write my own twitter account name and password, at the same time bitly account name and api key also.
bitly.php and twitter.php are in my forum root folder.
Adan0s
04-11-2010, 08:07 AM
anyone knows how to limit the script that threads in a forum, which first need to get moderated, don't get posted to twitter. but if a mod sets it visible it will be posted to twitter?
nstlx
04-11-2010, 10:36 AM
Polish characters are displaying incorrectly. Any way of solving it? Please take a look: www.twitter.com/dzwiek
I use iso-8859-2 coding
I solved the problem like this:
$tweet .= utf8_encode($newpost['title'].' '.$shortUrl);
Twitter uses utf8, so it with be ok also with English....
nstlx
zipperty
04-11-2010, 07:20 PM
Installed no problems instructions crystal clear. Thank you for such a useful mod.
sticky
04-12-2010, 11:40 AM
I'm considering installing this as I want more traffic but won't people get offended or annoyed with every new thread being tweeted?
milaszewski
04-12-2010, 12:33 PM
I solved the problem like this:
$tweet .= utf8_encode($newpost['title'].' '.$shortUrl);
Twitter uses utf8, so it with be ok also with English....
nstlx
it doesn't work... my forum is not utf8, it's iso-8859-2
milaszewski
04-12-2010, 12:44 PM
it doesn't work... my forum is not utf8, it's iso-8859-2
solved!
I added this line:
$tweet = iconv("ISO-8859-2", "UTF-8", $tweet);
Videx
04-12-2010, 10:18 PM
I'm considering installing this as I want more traffic but won't people get offended or annoyed with every new thread being tweeted?On a busy forum they certainly could. I use Digsby and always have a window open showing nothing but new threads on the forum, but not everyone is savvy enough to use filters like that.
sticky
04-12-2010, 10:24 PM
On a busy forum they certainly could. I use Digsby and always have a window open showing nothing but new threads on the forum, but not everyone is savvy enough to use filters like that.
I see, so is there something that can allow to pick and choose which threads to tweet by clicking a button instead of doing it manually?
Videx
04-12-2010, 10:57 PM
I see, so is there something that can allow to pick and choose which threads to tweet by clicking a button instead of doing it manually?Who the heck would have the time to sit and do that in a timely fashion? Especially on a busy board. More realistically, just limit tweeting to exclude your busiest forums. But there's nothing stopping you from manually tweeting if you really want to go that route.
Jabong82
04-12-2010, 11:00 PM
Anyone else have a separate Twitter account?
I just use this for SEO and have a separate account that people can follow. So 1 account for your updates/followers and another just for this mod.
sticky
04-12-2010, 11:04 PM
Who the heck would have the time to sit and do that in a timely fashion? Especially on a busy board. More realistically, just limit tweeting to exclude your busiest forums. But there's nothing stopping you from manually tweeting if you really want to go that route.
I know, but what I was hoping is simply a tweet button next to where it says quote which would tweet the thread using a url shortener. Simple... I don't want to spam my followers with every thread.
sticky
04-12-2010, 11:05 PM
Anyone else have a separate Twitter account?
I just use this for SEO and have a separate account that people can follow. So 1 account for your updates/followers and another just for this mod.
I see, two accounts would work but if there are no followers what is the point?
Jabong82
04-12-2010, 11:32 PM
I see, two accounts would work but if there are no followers what is the point?
Well if you have your posts tweeted, they create outside links to your site, which is one of the most important factors in search engine optimization (ie. ranking higher on google).
So yah no one would see it because you'd have no followers on that account, but in theory your search engine rankings should improve which is good for your overall site traffic.
LifesGreatestGift
04-13-2010, 07:42 AM
Thanks for the fix!
https://vborg.vbsupport.ru/showpost.php?p=2001364&postcount=287
Works perfect now! No more bit.ly or twitter php issues.
zelnik
04-14-2010, 09:47 AM
Installed and working great first time!
Thanks a million!
zelnik
04-14-2010, 03:35 PM
Just noticed that my RSS feeds are not being directed to Twitter?!?!
Noticed a lot of people saying the same.. I wouldn't mind making a small finanical donation if you could get RSS posts to be posted on Twitter?!
I'm sure others would also.
osayidan
04-15-2010, 04:09 PM
is bit.ly having issues? I can not seem to register...
"There was a problem posting your request. Please try again."
Been trying for quite some time now.
edit: never mind, that was disgusting... i couldn't sign up with FF 3.6, loaded up my old IE 6 and it worked...
Chicken Racer
04-16-2010, 01:10 PM
Just noticed that my RSS feeds are not being directed to Twitter?!?!
Noticed a lot of people saying the same.. I wouldn't mind making a small finanical donation if you could get RSS posts to be posted on Twitter?!
I'm sure others would also.
Yes I 2nd that !
Videx
04-16-2010, 02:49 PM
Why don't you just use Twitterfeed (or similar) to forward RSS to Twitter? Seems to me you're going to have trouble with any but the very shortest posts.
zelnik
04-16-2010, 03:34 PM
Why don't you just use Twitterfeed (or similar) to forward RSS to Twitter? Seems to me you're going to have trouble with any but the very shortest posts.
I'm not sure what the problem is with RSS feeds to twitter on vb4 as there are a couple of addons for vb3.8 which work very very well. :(
mmacrypt
04-17-2010, 02:32 AM
Just installed, seems to be working great, thank you very much.
Gene Steinberg
04-17-2010, 03:44 PM
This is very poorly designed. Why not just build a standard plugin with a traditional Admin CP interface to insert the relevant details for this linkage? As it stands, all I see is an amateurish hack. Does anyone know how to do this correctly?
Peace,
Gene
Xeon3D
04-20-2010, 05:54 AM
I'm getting the word "Array" appended to the end of each message and no link to the thread as you can check here:
http://twitter.com/xeon3dinfo/
here's my plugin contents:
// 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(5,6);
// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly = true;
if (!in_array($foruminfo[forumid], $excludedForums)) {
$shortUrl = 'http://www.xeon3d.info/forums/showthread.php?t='.$newpost[threadid];
if ($useBitly) {
// http://classes.verkoyen.eu/bitly
require_once 'bitly.php';
$bitly = new Bitly('realusernamehere', 'realAPIkeyhere');
$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('realusernamehere','realpasswordhere');
$twitter->updateStatus($tweet);
}
Videx
04-20-2010, 01:10 PM
I'm getting the word "Array" appended to the end of each message and no link to the thread as you can check here:Your code seems fine, so I'd look to some prior code interfering with it. A mod, or a bad edit. Maybe even some bad HTML somewhere.
Xeon3D
04-20-2010, 03:59 PM
Disabled all products i had running, still got the same effect, other than that, the forum is preety much what vbulletin provides...
gwerzal
04-20-2010, 08:58 PM
Woop woop got it working
Was proper doin me head in but got it workin in the end an think it was my own fault it wasnt working
Thank you
great mod
Phil K?vin
04-22-2010, 02:07 AM
I have a problem.
Parse error: syntax error, unexpected '/' in /home/.../public_html/newthread.php(273) : eval()'d code on line 11
SABRSox
04-25-2010, 02:48 AM
This plugin suddenly stopped working for me. I haven't changed anything to either the code or to my Twitter account. Thoughts?
Alecsmith
04-27-2010, 05:33 PM
Working thanks :)
TandyServices
04-27-2010, 07:08 PM
Works great so far but what about private forums?? Is there a way to shut it off on some forums??
zelnik
04-27-2010, 08:23 PM
Works great so far but what about private forums?? Is there a way to shut it off on some forums??
read the install instructions carefully :)
"You also should make a list of the forumIds that are non-public as you will want to put these in the array provided.
i.e. if your admin forum is forumId = 7 and you also have a private forum for regular members which is forumid = 12, then you will want this:
$excludedForums = array(7, 12);"
TandyServices
04-27-2010, 08:37 PM
Yea just found that and was coming back to repost how dumb I was for not reading.. LOL.. Sorry..
Bob_R
04-30-2010, 02:31 AM
This plugin suddenly stopped working for me. I haven't changed anything to either the code or to my Twitter account. Thoughts?
Same here.
Videx
04-30-2010, 02:44 AM
Same here.Assuming you aren't on dedicated servers, I hope you both immediately opened tickets with your hosts asking this same question? We need to know exactly what they're doing to break things and how to fix it.
Bob_R
05-01-2010, 11:56 AM
Assuming you aren't on dedicated servers, I hope you both immediately opened tickets with your hosts asking this same question? We need to know exactly what they're doing to break things and how to fix it.
I did submit a ticket yesterday morning.
In the meantime I can tell you this. I switched web hosts this week. Since then this vbulletin to twitter, live tweets of new threads hasn't worked.
Any other suggestions?
ukiya006
05-02-2010, 10:26 AM
I'm getting the word "Array" appended to the end of each message and no link to the thread as you can check here:
http://twitter.com/xeon3dinfo/
here's my plugin contents:
// 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(5,6);
// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly = true;
if (!in_array($foruminfo[forumid], $excludedForums)) {
$shortUrl = 'http://www.xeon3d.info/forums/showthread.php?t='.$newpost[threadid];
if ($useBitly) {
// http://classes.verkoyen.eu/bitly
require_once 'bitly.php';
$bitly = new Bitly('realusernamehere', 'realAPIkeyhere');
$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('realusernamehere','realpasswordhere');
$twitter->updateStatus($tweet);
}
I am having the same problem as him =(
Any solutions so far?
I came across tis error a few mins ago..
it seems related..
Status is a duplicate. on line 204 in /home/cbnoobco/public_html/thesgmall/twitter.php
#0 /home/cbnoobco/public_html/thesgmall/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /home/cbnoobco/public_html/thesgmall/newthread.php(514) : eval()'d code(26): Twitter->updateStatus(' Array')
#2 /home/cbnoobco/public_html/thesgmall/newthread.php(514): eval()
#3 {main}
Fatal error: Status is a duplicate. on line 204 in [path]/twitter.php in [path]/vb/vb.php on line 287
ukiya006
05-02-2010, 10:46 AM
Status is a duplicate. on line 204 in /home/cbnoobco/public_html/thesgmall/twitter.php
#0 /home/cbnoobco/public_html/thesgmall/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /home/cbnoobco/public_html/thesgmall/newthread.php(514) : eval()'d code(26): Twitter->updateStatus(' Array')
#2 /home/cbnoobco/public_html/thesgmall/newthread.php(514): eval()
#3 {main}
Fatal error: Status is a duplicate. on line 204 in [path]/twitter.php in [path]/vb/vb.php on line 287
Ok.. Manage to solve that.. Realised that I hooked it to the wrong location..
Hmm.. but now still got the word "Array" instead of the short url it's suppose to be showing.
ukiya006
05-02-2010, 11:54 AM
Ok.. Manage to solve that.. Realised that I hooked it to the wrong location..
Hmm.. but now still got the word "Array" instead of the short url it's suppose to be showing.
Solved.. by uploading the bitly.php that's available here instead of the one in the main website.
your24hourstore
05-02-2010, 02:23 PM
Sure, for those that have bitly working (not me).
man i have tried everything , to getthis hack to work its just not working i have had all the error did all the fixs and still cant use it :confused:
Even though i get the errors , when i refreshed the error page it sent the tweets through, so its almost kinda working
NOT installed
SlackerAPM
05-07-2010, 07:32 PM
I apologise if this has been asked before, I did look through the thread but couldn't find anything...
Is it possible to specify forums to include rather than exclude as I only want to include 2 forums. It would easier for me do that rather than exclude 35 other forums.
Thanks.
your24hourstore
05-07-2010, 07:37 PM
I apologise if this has been asked before, I did look through the thread but couldn't find anything...
Is it possible to specify forums to include rather than exclude as I only want to include 2 forums. It would easier for me do that rather than exclude 35 other forums.
Thanks.
really live up to your name dont you :)
SlackerAPM
05-07-2010, 07:41 PM
I should maybe change to EfficientAPM ;)
Videx
05-07-2010, 07:45 PM
Near the first line there's a !. Take it out to make it an inclusion list. if (!in_array
Bob_R
05-12-2010, 02:38 AM
Assuming you aren't on dedicated servers, I hope you both immediately opened tickets with your hosts asking this same question? We need to know exactly what they're doing to break things and how to fix it.
They've never given a definite answer. Everyone's passing the buck. But the mod doesn't work for me.
safe_mode is disabled. I have Json and Curl compiled.
What else can it be?????????
Bob_R
05-12-2010, 03:12 PM
OK here's the latest. I submitted a test thread and it went thru with no errors and is on my site.
But, it didn't tweet to twitter?
It's supposed to be instanteneous (sp?) right?
I wouldn't even have to wait any amount of time?
Thanks!!
Execution Order Use this field to enter the order in which code at the same hook will be executed. What should this number be?
clubplanet
05-12-2010, 07:01 PM
Great mod, thanks!
A couple of things to note:
1. Make sure you download all the PHP code. I missed the bracket at the end and got the error:
PHP Parse error: syntax error, unexpected $end in
2. Download the bitly.php file from this thread not from the URL linked in the post. The link is newer and does not work properly. It gives you the word "Array" rather than the bit.ly URL.
Bob_R
05-12-2010, 11:29 PM
Great mod, thanks!
A couple of things to note:
1. Make sure you download all the PHP code. I missed the bracket at the end and got the error:
PHP Parse error: syntax error, unexpected $end in
2. Download the bitly.php file from this thread not from the URL linked in the post. The link is newer and does not work properly. It gives you the word "Array" rather than the bit.ly URL.
Got all of that. Still doesn't work. See post 372
Now it's not even going to my bit.ly.
Sparrow-Sean
05-13-2010, 12:38 AM
Seems to work fine with the latest vBulletin and I followed the correct procedures ;)
Bob_R
05-13-2010, 03:37 PM
Actually the only thing I did find out is that the actual server software my webhost uses is LiteSpeed instead of Apache, in most cases this will not cause an issue since LiteSpeed is far superior than Apache.
I followed all directions, do not get errors, but do not see the post happening on Twitter.
Posted several tests then deleted them.
YouTubeVZ
05-14-2010, 12:13 AM
Dont work ?!?!?!?!?!?! :(
betts02
05-16-2010, 11:14 AM
Had to uninstall
Put everything in the correct place but when i activate the forumblock i get fatal errors
iguano
05-16-2010, 12:20 PM
Turn off, i get errores every new thread :-(
betts02
05-16-2010, 02:30 PM
Turn off, i get errores every new thread :-(
Exactly the same mate, looked good but had to turn it off
melbo
05-21-2010, 12:08 AM
Works perfectly on my 3.8.5 forum. Is there a way I can make the regular twitter social bookmark button in every thread use my bit.ly? Also, do you have a 'post to Facebook' option??? Would be very cool.
tommac3
05-21-2010, 01:15 AM
I would love to install if it works
stoute
05-22-2010, 10:33 PM
I seem to have done something wrong here. I receive the error code below;
Warning: require_once(bitly.php) [function.require-once]: failed to open stream: No such file or directory in [path]/newthread.php(273) : eval()'d code on line 125
Fatal error: require_once() [function.require]: Failed opening required 'bitly.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/tttsndcx/public_html/home/newthread.php(273) : eval()'d code on line 125
Any assistance with this would be great! I am using 4.0.3 if that makes a difference.
Videx
05-22-2010, 11:43 PM
I seem to have done something wrong here. I receive the error code below;
Warning: require_once(bitly.php)Can we assume you have already read back through all the pages in this thread and haven't found anyone else having the same error?
Hint: Forget bitly; you can't use it on your server.
I get the following error:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Invalid at the top level of the document. Error processing resource 'http://www.forum.com/newthread.php?do=postthread&...
</hash>
HipHopStan.com
05-23-2010, 11:03 PM
i just installed. I'm on PHP 5.2.13 -- using vbSEO 3.3.2 -- and its working great so far for me. I'm also on vB 3.8.2
:up:
rrudeboy
05-24-2010, 01:36 PM
works great, only thing i'm looking for is a way to have only posts made by users with an X amount of posts tweeted... you know, to prevent spam tweets.
thanks.
momon
05-25-2010, 06:07 AM
Let me share my solution.
bitly.php:
I set the following Curl options:
$options[CURLOPT_FOLLOWLOCATION] = false;
$options[CURLOPT_HEADER] = false;
and for twitter.php:
$options[CURLOPT_FOLLOWLOCATION] = false;
Then all error messages gone! :)
This is for ppl reporting problems with json still, after reading through the thread, this post in particular finally solved things for me and the plugin is working wonderfully now.
https://vborg.vbsupport.ru/showthread.php?t=234288&page=7
jahna
05-26-2010, 08:13 AM
Mine is not working!
can anyone check the my code here please, thanks a lot:
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(3,6);
// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly = true;
if (!in_array($foruminfo[forumid], $excludedForums)) {
$shortUrl = 'http://www.mymarketingforum.ch/forum/showthread.php?t='.$newpost[threadid];
if ($useBitly) {
// http://classes.verkoyen.eu/bitly
require_once 'bitly.php';
$bitly = new Bitly('mymafo','http://bit.ly/a6LdSx');
$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('mymafo','xxxxxxxxxx');
$twitter->updateStatus($tweet);
EconomicVoice
05-29-2010, 08:51 AM
Let me share my solution.
bitly.php:
I set the following Curl options:
$options[CURLOPT_FOLLOWLOCATION] = false;
$options[CURLOPT_HEADER] = false;
and for twitter.php:
$options[CURLOPT_FOLLOWLOCATION] = false;
Then all error messages gone! :)
This is the solution that worked for me too (like many others).
Although I didn't seem to have a 'CURLOPT_HEADER' in the bitly php, just changing the other two did the job.
Bob_R
05-29-2010, 01:11 PM
This is for ppl reporting problems with json still, after reading through the thread, this post in particular finally solved things for me and the plugin is working wonderfully now.
https://vborg.vbsupport.ru/showthread.php?t=234288&page=7
Where? After line 136?
carrlos
05-29-2010, 09:32 PM
Installed. Works perfectly.
An "include" forums option would be great for those of us who have less forums we'd like to include than exclude. ;)
Bob_R
05-29-2010, 10:42 PM
I actually got it to work except for one little thing.
When you click the shortened link (is.gd) on Twitter you're directed to my site and and get this message:
No Thread specified. If you followed a valid link, please notify the administrator
Videx
05-30-2010, 12:08 AM
An "include" forums option would be great for those of us who have less forums we'd like to include than exclude. ;)Simply remove the bang (! - exclamation point) from the line near the beginning to make it an inclusion list.if (!in_array($foruminfo[forumid...
Still getting the error "cannot view XML input using xsl stylesheet"... Sounds like something simple. Any ideas?
Videx
05-31-2010, 07:28 AM
Still getting the error "cannot view XML input using xsl stylesheet"... Sounds like something simple. Any ideas?I believe that's a viewer problem. Can you verify you've tried viewing the feed in several different browsers? Do they all give you the same error?
kefallon
05-31-2010, 08:17 AM
Look i know i should check the preceding 27 pages but could someone in the know tell me if this issue is fixed yet??
statuses/update.xml Could not authenticate you. Unauthorized on line 229 in /var/www/vhosts/ionian-island.co.uk/httpdocs/forums/twitter.php
#0 /var/www/vhosts/ionian-island.co.uk/httpdocs/forums/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /var/www/vhosts/ionian-island.co.uk/httpdocs/forums/newthread.php(262) : eval()'d code(26): Twitter->updateStatus('test http://www...')
#2 /var/www/vhosts/ionian-island.co.uk/httpdocs/forums/newthread.php(262): eval()
#3 {main}
if not any other suggestions i would really like to get the ability to tweet messages from my board working.
was using IE... I didn't try in another browser. Obv it would be useless if it only worked in Firefox anyway. But I am sure it is supposed to work in IE and there is something else going on here. I am using a custom skin on my forum, but then most of us probably are. Maybe it is something to do with the doctype specified in some of the CSS templates, or something similar? Just a guess. Any ideas welcomed...
Videx
05-31-2010, 11:43 AM
was using IE... I didn't try in another browser. Obv it would be useless if it only worked in Firefox anyway.Clearly you missed my point entirely, and apparently you aren't used to testing things in different browsers. Sorry, but that's not how forum administration works. You need to immediately install Firefox, Chrome, Safari, and Opera and get used to trying things out in a few of them, both logged in and not logged in.
In this particular case you would have immediately seen that the problem is not with vb or this mod. OTOH, if you saw this in every reader you tried, I'd say we need a link to try it for ourselves.
And to kefallon: No, I don't think there has ever been a good solution to Twitter "could not authenticate" errors. But I wouldn't take my word for it and would slog through all the pages anyway.
Bob_R
05-31-2010, 10:22 PM
Let me share my solution.
bitly.php:
I set the following Curl options:
$options[CURLOPT_FOLLOWLOCATION] = false;
$options[CURLOPT_HEADER] = false;
and for twitter.php:
$options[CURLOPT_FOLLOWLOCATION] = false;
Then all error messages gone! :)
Sure it's not true for the first and third one?
Still doesn't work. :down:
betts02
06-01-2010, 08:11 AM
Used the files from here and got it working fine
Only thing i ask is ?
If i do not enter any forum ID's to be restricted, Even though they are restricted on my site, Will it show the thread to members who have no access ?
Cheers
anthony parsons
06-01-2010, 09:15 AM
Here what I did, I went into twitter.php and set the following to false.
$options[CURLOPT_FOLLOWLOCATION] = false;
You are a lad... thank you. This was the fix for me... I just kept getting an XML error in 4.0.3PL1 and running on my own VPS... headache material. That did the trick though with bit.ly turned off.
Videx
06-01-2010, 05:00 PM
If i do not enter any forum ID's to be restricted, Even though they are restricted on my site, Will it show the thread to members who have no access ?
CheersCurrently, yes. All activity in all forums is sent unless you specifically exclude (or include) them.
MorgUk
06-01-2010, 08:50 PM
Couldn't get it going, keeps flagging errors. Did exactly what you said and fix's others had, version 4.0.3 Thanks for trying though :(
michelle86
06-03-2010, 02:27 PM
Had to uninstall this. Everytime I would create a new post, I would try to reload the page, and it would give me a database error which would last for a couple minutes until I was able to successfully view the page. Also, the visitor count went up by 20-60 visitors. I have live Clicky Analytics stats, and would have only a few visitors on the page, not 64 as it once claimed! I don't know what's up with this mod, but everything has gone back to normal after uninstalling.
iguano
06-03-2010, 02:54 PM
Had to uninstall this. Everytime I would create a new post, I would try to reload the page, and it would give me a database error which would last for a couple minutes until I was able to successfully view the page.
see this:
Originally Posted by imported_nimbus View Post
Let me share my solution.
bitly.php:
I set the following Curl options:
$options[CURLOPT_FOLLOWLOCATION] = false;
$options[CURLOPT_HEADER] = false;
and for twitter.php:
$options[CURLOPT_FOLLOWLOCATION] = false;
After this, works to me
Michlerish
06-04-2010, 08:18 AM
This is really awesome, thank you. :)
sportsbuddys
06-07-2010, 05:59 AM
Works great! Very nice hack :)
cbehan
06-07-2010, 07:09 PM
OK, I followed the instructions, and the process is creating the bit.ly link and the twitter post with the link, but there's no thread title information or thread ID in the link or twitter post.
That has to be something with the plugin, correct?
JHUMON
06-08-2010, 10:35 AM
not its working nice.Thanks
There's a better mod available that is easier to install and has lots of lovely options.
giorgino
06-08-2010, 11:52 AM
There's a better mod available that is easier to install and has lots of lovely options.
link? :)
Hello
Im getting this error when posting in my forum:
Fatal error: Call to undefined method Twitter::updateStatus() in /home/raverno/public_html/oddseksperten.no/newthread.php(273) : eval()'d code on line 26
Any clue?
Videx
06-08-2010, 12:49 PM
Fatal error: Call to undefined methodThat's a new one. You sure you uploaded the classes files to the right place?
BTW, Twitter is changing authorization at the end of the month and this mod is presumably going to stop working then.
link? :)
https://vborg.vbsupport.ru/showthread.php?t=236278
BTW, Twitter is changing authorization at the end of the month and this mod is presumably going to stop working then.
Yes, Videx is correct, this hack will stop working, the same as with my version.
Would it not be fairly easy for a coder to get it working again?
ragtek
06-14-2010, 09:26 AM
Is there any working add-on for vB4?
Videx
06-14-2010, 11:40 AM
Is there any working add-on for vB4?You mean like the one linked 3 posts above yours? :)
Note that this whole thing is very dependent on lots of server settings and some people have been unable to get it working.
CRDeveloper
06-15-2010, 03:57 AM
Tonight i started getting this error after new threads:
Bad Gateway on line 229 in /home/toxxxic/public_html/foro/twitter.php
#0 /home/toxxxic/public_html/foro/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /home/toxxxic/public_html/foro/newthread.php(262) : eval()'d code(26): Twitter->updateStatus('Lesbians Becomi...')
#2 /home/toxxxic/public_html/foro/newthread.php(262): eval()
#3 {main}
Warning: Invalid error type specified in [path]/vb/vb.php on line 284
The tweets still working but what about that??
I red about this mod and the other one will stop working, so is twitter.com already making changes???
Whats up with this mod https://vborg.vbsupport.ru/showthread.php?t=216346 ?
That one uses OAuth authentication but for 3.8.x boards...
Anyways im confuse, im gonna have to uninstall this mod since it will stop working and tell my users to tweet them selfs haha
merk_aus
06-15-2010, 04:34 AM
Any assistance in getting this for the CMS only with Articles?
Crazyfruitbat
06-15-2010, 08:33 AM
yeah I'm after the cms one too - that is way more important that twittering forum posts on my site
The main concern should be to get this working with openauth or whatever you call it otherwise you can forget the CMS tweets altogether.
Videx
06-15-2010, 01:52 PM
yeah I'm after the cms one too - that is way more important that twittering forum posts on my siteIn our case most of our articles are promoted from the forums so have already been tweeted. New articles are usually bumped in the forums so get tweeted. No real need just to tweet a new article by itself.
merk_aus
06-15-2010, 01:58 PM
In our case most of our articles are promoted from the forums so have already been tweeted. New articles are usually bumped in the forums so get tweeted. No real need just to tweet a new article by itself.
Maybe not for you but for those of us who run a news service with the message board there for fun there is a point.
Our articles are written into the CMS. Users who want to hang around after reading can then go to the forums and posts etc.
puppetmaster222
06-15-2010, 02:47 PM
Is there any fix for when Twitter is over capacity? I get gnarly looking failed database messages when it's over-cap and I try to post a thread. Turning it off for now even though it is a nice mod. I rather just not risk the site looking like it totally died on new members making Intro threads or something.
Videx
06-15-2010, 04:14 PM
Our articles are written into the CMS. Didn't this just come up somewhere? The CMS is just another forum, isn't it? All articles there start a thread in the CMS forum vBCms Comments. So why can't you tweet this forum? Maybe if it was unhidden?
AURFSCAN
06-16-2010, 01:45 AM
Heres an error and Im assuming the attached image is the culprit. Apart from this happening once ...everthing works as it should thx
Bad Gateway on line 229 in /home/********/public_html/twitter.php
#0 /home/********/public_html/twitter.php(648):
Twitter->doCall('statuses/update...', Array, true)
#1 /home/********/public_html/newthread.php(262) : eval()'d code(26):
Twitter->updateStatus('Greetings (my i...')
#2 /home/********/public_html/newthread.php(262): eval()
#3 {main}
Warning: Invalid error type specified in [path]/vb/vb.php on line 284
cronjob78
06-16-2010, 01:58 PM
A cool option would be if seperate forums could be assigned to seperate tweets rather than just being able to exclude certain forums. The forum I admin has very diverse sub-forums so anyone interested in music doesn't want sports tweets and vice versa.
I tried to be clever and rename the .xml file and rename the productID and <title> in the file itself. It imports fine but doesn't show up in admincp->settings alongside the first copy which is a bit perplexing.
If anyone has a suggestion I'd love to hear it.
Might be something worth considering to include in the hack for the future.
Videx
06-16-2010, 03:00 PM
Heres an error and Im assuming the attached image is the culprit. Ha. That's Twitter's "Fail whale". Their servers have been overwhelmed by the World Cup. Word is that they're going to have to take the whole thing down for a while soon to implement changes.
A cool option would be if seperate forums could be assigned to seperate tweets rather than just being able to exclude certain forumsNo doubt the mod can use a lot of improvement. But you might have better luck posting over at https://vborg.vbsupport.ru/showthread.php?t=236278 where it's an actual mod, not just a code hack. Be advised he charges for support, but if he can do this I bet others may help you pay for it.
sassou2009
06-17-2010, 02:42 AM
Hi,
It's Working Fine and thank's but it does not support Arabic !
Micronichos
06-17-2010, 07:41 PM
Working perfect, some problem with tildes in spanish, for example:
Remi Gaillard, posiblemente el tipo m?genuino de Internet
instead of
Remi Gaillard, posiblemente el tipo m?s genuino de Internet
If you need my help contact me ;) thank you for such useful mod.
vilhiem
06-19-2010, 12:38 AM
OK ... I'm totally confused.
I did everything as instructed ... but just so you know, in your PHP code displayed here ... NOTHING in the code is BOLDED !!!
So, I put in the variables for everything between the '< and >'
Set up all the Twitter and Bit accounts ... put in the info ...
And ... NOTHING happens (no errors either).
So now it makes me wonder if the instructions are not being exactly clear.
For instance, do I need to enter something where it says ... 'prefixid' ...?
Or said another way ... am I supposed to modify everything between the ... ' and ' ...?
Because the instructions say replace either the BOLD (which doesn't show) or everything between the '< and >' (which still doesn't account for the URL, because it's not between the < and> )
Videx
06-19-2010, 01:47 AM
The bolding may be long gone, but did you read the first few pages of this mod? They make it very clear what needs to be done. Never ever install a mod without reading the entire thread.
Juggernaut
06-19-2010, 01:53 AM
I'm not very good at installing mods, but I installed this mod a while back, following the instructions here, and didn't have any problems at any time, with the installation, the instructions are very clear :D
vilhiem
06-19-2010, 02:15 AM
ok ... my bad ... got it working (sorry I jumped the gun there)
But I do have a question ... it works great ... but is there a simple way to get this to work on "replies" ...? I saw someone in this thread posted a possible solution ... just not sure if it's the best.
Thnx!
LuisManson
06-19-2010, 05:36 PM
there seems to be an upgrade to twitter.class here:
http://classes.verkoyen.eu/twitter_oauth
no idea if the api is the same
vilhiem
06-20-2010, 03:08 AM
so ... I incorporated the mod to this mod (contributed by lhridley) ... the one allowing for 'replies' to work too ... and it worked fine! Just be sure to be careful with the code, there's a missing "m" in the ".com" portion of the URL (and I think a few other things). Otherwise, works great!
QUESTION: Is there any way I can transfer the "tags" from new posts to the "#keywords" in the code for this plugin ...?
Thanks!
vilhiem
06-21-2010, 04:14 PM
One more question ...
Not sure if anyone else here has noticed this ... but it doesn't seem to work if the new thread is "auto-generated". For instance, I'm using a couple mods that make new threads, yet no "twits" are generated:
(1) "BBR - Welcome Thread Upon Registration"; and
(2) "auto-reply"
jhellein
06-22-2010, 02:14 PM
Do I need to create a separate plugin to auto-tweet blog posts in 4.0.3? Will the same code work or does it need to be modified? Thank you.
Dragonsys
06-22-2010, 03:17 PM
One more question ...
Not sure if anyone else here has noticed this ... but it doesn't seem to work if the new thread is "auto-generated". For instance, I'm using a couple mods that make new threads, yet no "twits" are generated:
(1) "BBR - Welcome Thread Upon Registration"; and
(2) "auto-reply"
I believe those mods submit the new auto-post straight to the DB, so they do not use the normal submit post method, and therefore they bypass this tweet mod all together.
vilhiem
06-22-2010, 03:46 PM
I believe those mods submit the new auto-post straight to the DB, so they do not use the normal submit post method, and therefore they bypass this tweet mod all together.
Thanks Dragonsys ... but can you imagine any way around this to get it to work ...?
Thanks and great mod!!!
Dragonsys
06-22-2010, 06:08 PM
Thanks Dragonsys ... but can you imagine any way around this to get it to work ...?
Thanks and great mod!!!
All i can really suggest is to ask the author's of those mods if they can make them work with this one (or vice versa)
mimocherry
06-23-2010, 05:33 AM
I got a headache reading through all the posts, and still can not resolve my issue...
I really would like to use bitz.ly, and I think that I have setup the API Key correctly.
however, I still get the following errors..according to other posts, I should use is.gd, but can I use bitzly, and resolve the following issue??
nvalid JSON-response on line 203 in /var/www/vhosts/website/httpdocs/forum/includes/bitly.php
#0 /var/www/vhosts/website/httpdocs/forum/includes/bitly.php(414): Bitly->doCall('shorten', Array)
thanks so muchhhh
Dragonsys
06-23-2010, 01:09 PM
I got a headache reading through all the posts, and still can not resolve my issue...
I really would like to use bitz.ly, and I think that I have setup the API Key correctly.
however, I still get the following errors..according to other posts, I should use is.gd, but can I use bitzly, and resolve the following issue??
nvalid JSON-response on line 203 in /var/www/vhosts/website/httpdocs/forum/includes/bitly.php
#0 /var/www/vhosts/website/httpdocs/forum/includes/bitly.php(414): Bitly->doCall('shorten', Array)
thanks so muchhhh
As stated in the OP:
Q: I see an "INVALID_JSON" error
A: Disable bitly by setting $useBitly to false.
This is probably due to JSON being limited or not installed by your webhost. Check you phpinfo and make sure JSON is installed.
mikeo9043
06-23-2010, 01:28 PM
Can we add more then 1 twitter account?
mimocherry
06-23-2010, 02:32 PM
thanks for your kind reply.
1. I do have JSON enabled.
json
json support enabled
json version 1.2.1
2. how do I set $useBitly to false? which file?
thanks!
mimocherry
06-23-2010, 02:56 PM
And that's it. Save and activate the plugin and create a test thread.
Now whenever a new thread is started, a tweet will be made to twitter instantly
#okay, I see it now..my god, it is a plugin......I was looking into the bitly.php and twitter.php forever....
sorry, I am new to this..
Dragonsys
06-23-2010, 04:22 PM
And that's it. Save and activate the plugin and create a test thread.
Now whenever a new thread is started, a tweet will be made to twitter instantly
#okay, I see it now..my god, it is a plugin......I was looking into the bitly.php and twitter.php forever....
sorry, I am new to this..
you get it working?
mimocherry
06-23-2010, 04:52 PM
Okay, I pasted the code as a hook, do I choose new_post_complete as the hook location?
no error message, but nothing happened as well :-(
rrudeboy
06-23-2010, 05:53 PM
works great, only thing i'm looking for is a way to have only posts made by users with an X amount of posts tweeted... you know, to prevent spam tweets. (short of once again creating a usergroup)
thanks.
anybody who can help ? plz ?...
darren1981
06-23-2010, 08:14 PM
Hey great mod.. but does this put much extra stress on the server ?
Dragonsys
06-24-2010, 01:26 PM
anybody who can help ? plz ?...
This mod will not do that currently. I do not know of any which do.
sassou2009
06-26-2010, 01:13 AM
Pleeeeeeeese how to get this work on Arabic vbulletin ?:confused::confused::confused:
thesupermario69
06-30-2010, 12:05 PM
Hi,
I have installed this mod and have only got it half working, so I was wondering if anyone can help me out
I get no error messages and I get a tweet posted on Twitter and a link made in bit.ly however the problem is that the tweet only has the thread title in it and then the word "Array", the bit.ly link that was created is not on the tweet. However when I login to bit.ly I can see the link that was created
Any ideas?
Thanks
Sam-TheMaster
06-30-2010, 01:46 PM
wow, little hack and ready to go. I really loved this mod. Its good - Can we make option whether to post on twitter or not?
Dragonsys
06-30-2010, 11:55 PM
Hi,
I have installed this mod and have only got it half working, so I was wondering if anyone can help me out
I get no error messages and I get a tweet posted on Twitter and a link made in bit.ly however the problem is that the tweet only has the thread title in it and then the word "Array", the bit.ly link that was created is not on the tweet. However when I login to bit.ly I can see the link that was created
Any ideas?
Thanks
are you using the twitter.php which is attached to this page or the one downloaded from http://classes.verkoyen.eu/twitter/
make sure you use the one attached to the mod post, the one from the link above does not work for everyone.
thesupermario69
07-01-2010, 09:47 AM
are you using the twitter.php which is attached to this page or the one downloaded from http://classes.verkoyen.eu/twitter/
make sure you use the one attached to the mod post, the one from the link above does not work for everyone.
Brilliant! Thank you!
I couldnt download the ones from this post yesterday so used the ones on the link instead and obviously that was the problem
Thanks again
jahna
07-01-2010, 12:12 PM
I've installed it but won't work.....
Can someone help me by checking the code below? Thanks a lot!
// 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(0);
// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly = true;
if (!in_array($foruminfo[forumid], $excludedForums = array(6)) {
$shortUrl = 'http://www.mymarketingforum.ch/showthread.php?t='.$newpost[threadid];
if ($useBitly) {
// http://classes.verkoyen.eu/bitly
require_once 'bitly.php';
$bitly = new Bitly('mymafo','http://bit.ly/9nWRYw');
$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('mymafo','xxxxxxxxx');
$twitter->updateStatus($tweet);
}
Numenorean7
07-05-2010, 01:19 AM
It works great, thanks a bunch :)
Dragonsys
07-05-2010, 05:10 PM
I've installed it but won't work.....
Can someone help me by checking the code below? Thanks a lot!
Details?
Check it for what? What error(s) are you getting. Just saying it doesn't work tells us nothing, and makes helping you impossible.
Videx
07-05-2010, 05:47 PM
Actually, I think I do see a goof up in line 7. Why are you redeclaring the array? Did someone tell you to do that?if (!in_array($foruminfo[forumid], $excludedForums = array(6)) {
I think you're just supposed to enter the 6 in line 2:$excludedForums = array(6);
TroyTrojansFan
07-06-2010, 04:16 AM
Opps, wrong thread. Sorry. :-)
Dave-M
07-07-2010, 11:46 PM
Thanks for this, it's working great, but there's one thing I'd like to get working if possible.
When an article is posted on the CMS, it automatically posts a notification thread, but for some reason these threads don't get tweeted. Does anyone have any idea why this would be please?
Edit: I've just noticed that threads posted via RSS don't get tweeted either.
I'm on 4.0.3 CMS.
Thanks muchly :)
penmai.com
07-08-2010, 05:52 AM
I had installed vbseo in vbulletin 4.0.2.
When i posting it automatically tweets in twitter but when i am viewing the page It shows me Not found page. I think the url is not in vbseo format (i.e.) The url is like this
"http://www.penmai.com/forum/showthread.php?t=264"
instead of like this "http://www.penmai.com/forums/media-talk/264-soundarya-rajinikanth-engagement-photos.html"
What can i do to redirect to vbseo url.
Dragonsys
07-08-2010, 01:52 PM
When an article is posted on the CMS, it automatically posts a notification thread, but for some reason these threads don't get tweeted. Does anyone have any idea why this would be please?
Edit: I've just noticed that threads posted via RSS don't get tweeted either.
This is because these types of posts do not use the normal posting method, and therefore by-pass this mod altogether.
Dave-M
07-08-2010, 04:43 PM
Thanks, so, at present, it something I can't fix then? it's not a huge problem for me, but we get a lot of rss feed posts and it seems a shame to lose out on the traffic from them :)
Videx
07-08-2010, 10:37 PM
... we get a lot of rss feed posts and it seems a shame to lose out on the traffic from them :)You probably shouldn't re-tweet someone else's material anyway. Do you want people taking your RSS and tweeting it?
Dave-M
07-08-2010, 11:09 PM
It's from our Joomla front end.
And yes, why would I mind people tweeting our rss feed? they all ultimately come back to our site to read the article. On the other hand, if they took the content and then tweeted their own site without a link to us, then that would be bad.
giorgino
07-10-2010, 08:05 AM
I've this problem with bitly setted up to false
{ "status_code": 200, "status_txt": "OK", "data": { "long_url": "http:\/\/www.immobilio.it\/showthread.php?t=6139", "url": "http:\/\/bit.ly\/c2CwZT", "hash": "c2CwZT", "global_hash": "dt21Ec", "new_hash": 1 } } Invalid JSON-response on line 202 in /var/www/vhosts/immobilio.it/httpdocs/bitly.php
#0 /var/www/vhosts/immobilio.it/httpdocs/bitly.php(413): Bitly->doCall('shorten', Array)
#1 /var/www/vhosts/immobilio.it/httpdocs/newthread.php(274) : eval()'d code(14): Bitly->shorten('http://www.immo...')
#2 /var/www/vhosts/immobilio.it/httpdocs/newthread.php(274): eval()
#3 /var/www/vhosts/immobilio.it/httpdocs/vbseo.php(1392): require('/var/www/vhosts...')
#4 {main}
What's wrong?
Videx
07-10-2010, 01:45 PM
What's wrong?Who knows. But since this version is due to stop working soon, nobody should bother trying to get it to work any more. Use the other one: vBulletin2Twitter (https://vborg.vbsupport.ru/showthread.php?t=236278&highlight=twitter)
Dragonsys
07-11-2010, 04:33 PM
I've this problem with bitly setted up to false
{ "status_code": 200, "status_txt": "OK", "data": { "long_url": "http:\/\/www.immobilio.it\/showthread.php?t=6139", "url": "http:\/\/bit.ly\/c2CwZT", "hash": "c2CwZT", "global_hash": "dt21Ec", "new_hash": 1 } } Invalid JSON-response on line 202 in /var/www/vhosts/immobilio.it/httpdocs/bitly.php
#0 /var/www/vhosts/immobilio.it/httpdocs/bitly.php(413): Bitly->doCall('shorten', Array)
#1 /var/www/vhosts/immobilio.it/httpdocs/newthread.php(274) : eval()'d code(14): Bitly->shorten('http://www.immo...')
#2 /var/www/vhosts/immobilio.it/httpdocs/newthread.php(274): eval()
#3 /var/www/vhosts/immobilio.it/httpdocs/vbseo.php(1392): require('/var/www/vhosts...')
#4 {main}
What's wrong?
Q: I see an "INVALID_JSON" error
A: Disable bitly by setting $useBitly to false.
Sgroove
07-12-2010, 05:21 PM
How can I pull tweets from the CMS ?
The URL is http://www.domainname/forum/content.php
Thanks,
Leo
egexperiment626
07-15-2010, 03:56 AM
I keep getting the following error:
Parse error: syntax error, unexpected T_VARIABLE in /path/forums/newthread.php(271):eval()'d code on line 7
It will create the new thread but it will not go to Bit or Twitter.
I've read through the entire thread and I've seen other people post a similar error, but I'm not seeing that it has been solved. Anybody have an idea on how to fix it?
Boko577
07-16-2010, 12:44 AM
This doesn't work with threads that are made by a bot from an RSS feed. Any reason why it will not?
Videx
07-16-2010, 01:10 AM
This doesn't work with threads that are made by a bot from an RSS feed. Any reason why it will not?Basically because those posts don't come from the same direction as posts made by a live person. Ditto any other automatic posts, like those from the calendar (Event Forums).
Boko577
07-16-2010, 02:39 AM
Basically because those posts don't come from the same direction as posts made by a live person. Ditto any other automatic posts, like those from the calendar (Event Forums).
Is there a way to make it work though?
Kingdombuilder
07-16-2010, 04:02 AM
After reading through loads of pages i followed the adjustments below and I'm closer than I have ever been. Currently I'm able to post to twitter as long as i set the bit.ly to false in my plugin.
vB 4.0.2
vBSEO 3.5: Custom URLs
Charset: UTF-8 ( Russian)
User details: correct
CURL: installed.
JSON: enabled.
Safe_Mode: off
bitly.php CURL options:
// set options
$options[CURLOPT_URL] = $url;
$options[CURLOPT_PORT] = self::API_PORT;
$options[CURLOPT_USERAGENT] = $this->getUserAgent();
$options[CURLOPT_FOLLOWLOCATION] = false;
$options[CURLOPT_HEADER] = false;
$options[CURLOPT_RETURNTRANSFER] = true;
$options[CURLOPT_TIMEOUT] = (int) $this->getTimeOut();
tweeter.php CURL options:
// set options
$options[CURLOPT_URL] = $url;
$options[CURLOPT_PORT] = self::TWITTER_API_PORT;
$options[CURLOPT_USERAGENT] = $this->getUserAgent();
$options[CURLOPT_FOLLOWLOCATION] = false;
$options[CURLOPT_RETURNTRANSFER] = true;
$options[CURLOPT_TIMEOUT] = (int) $this->getTimeOut();
Hope it helps somebody.
All the best!
When I set it to true I get the following error:
You must be authenticated to access shorten on line 194 in /usr/local/4admin/apache/vhosts/blackberryspot.com/httpdocs/forum/bitly.php
#0 /usr/local/4admin/apache/vhosts/blackberryspot.com/httpdocs/forum/bitly.php(383): Bitly->doCall('shorten', Array)
#1 /usr/local/4admin/apache/vhosts/blackberryspot.com/httpdocs/forum/newthread.php(262) : eval()'d code(14): Bitly->shorten('http://www.Blac...')
#2 /usr/local/4admin/apache/vhosts/blackberryspot.com/httpdocs/forum/newthread.php(262): eval()
#3 {main}
Warning: Invalid error type specified in [path]/vb/vb.php on line 284
Can anyone shed any light on this problem?
Videx
07-16-2010, 01:30 PM
Is there a way to make it work though?Probably, at some point. But not by me. It may require different hooks in the vb code itself, I dunno.
A reminder: This mod is going to stop working in August since it has not been modified to work with Twitter's new oauth. Everyone should stop fooling with it.
Microlex
07-19-2010, 02:48 PM
Hello, I've installed the pluging but i'm having the following warning/errors msg:
Warning: require_once() [function.require-once]: URL file-access is disabled in the server configuration in [path]/newthread.php(274) : eval()'d code on line 12
Warning: require_once(http://www.microlex.com.ar/foro/bitly.php) [function.require-once]: failed to open stream: no suitable wrapper could be found in [path]/newthread.php(274) : eval()'d code on line 12
Fatal error: require_once() [function.require]: Failed opening required 'http://www.microlex.com.ar/foro/bitly.php' (include_path='.:/opt/php5/lib/php') in /home/xxxxxxxxx/public_html/foro/newthread.php(274) : eval()'d code on line 12
We will appreciate your help
Thanks!
Videx
07-19-2010, 02:58 PM
Pretty obviously a server error, but you didn't tell us a thing about your server. So try it without bitly.
A reminder: This mod is going to stop working in August since it has not been modified to work with Twitter's new oauth. Everyone should stop fooling with it.
ErnieTheMilk
07-22-2010, 07:27 AM
I've been trying for awhile now to get this working on 3.8.4 with no luck :(
I get no error messages, but it posts nothing to twitter at all..
Here is my code, can anyone see anything obviously wrong with it?
// 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(27);
// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly = false;
if (!in_array($foruminfo[forumid], $excludedForums)) {
$shortUrl = 'http://www.mysite.net/showthread.php?t='.$newpost[threadid];
if ($useBitly) {
// http://classes.verkoyen.eu/bitly
require_once 'bitly.php';
$bitly = new Bitly('username','API Key');
$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('twitname','password');
$twitter->updateStatus($tweet);
}
Thanks
Videx
07-22-2010, 02:26 PM
It looks okay to me. But why are you screwing with it? It's going to stop working in a couple weeks regardless what you do. Stop messing with this one people!
The working one is at vBulletin2Twitter (https://vborg.vbsupport.ru/showthread.php?t=236278&highlight=twitter) .
ErnieTheMilk
07-22-2010, 02:40 PM
It looks okay to me. But why are you screwing with it? It's going to stop working in a couple weeks regardless what you do. Stop messing with this one people!
The working one is at vBulletin2Twitter (https://vborg.vbsupport.ru/showthread.php?t=236278&highlight=twitter) .
Thanks, so why doesn't it work :D
And why is this one going to stop working in a week or so? I don't understand why it should stop working...
Videx
07-22-2010, 02:57 PM
And why is this one going to stop working in a week or so? I don't understand why it should stop working...Twitter is switching to oauth - a different type of authentication. They've extended the date once already; hard to say if they will do it again.
bandare
07-22-2010, 03:18 PM
I've done loads of searching now but don't understand why there isn't a plugin that can automatically upload an article to twitter from the CMS rather than from forum. Could someone explain the difficulty please?
ErnieTheMilk
07-22-2010, 03:28 PM
Twitter is switching to oauth - a different type of authentication. They've extended the date once already; hard to say if they will do it again.
Ah OK, many thanks :)
Will have to figure out another way round it!
Dj Smuggla
07-24-2010, 01:22 PM
Thanks buro this works great...
nikosb
07-26-2010, 07:14 PM
Thanks
Works fine with vb 4.0.5
blacksurfer
07-27-2010, 02:55 AM
Finally got it to work. I forgot to make the plug-in active. Duh!
I am going to remind everyone who insists on installing this hack yet again, that it will just stop working in less than three (3) weeks time:
IMPORTANT NOTICE: On Monday 16th August 2010 this hack will cease to work unless the author updates this hack to use OAuth authentication, as that is the date Twitter is turning off Basic authentication (which is what this hack is currently using) and thus only allowing the use of OAuth authentication (see this announcement by Twitter - http://dev.twitter.com/announcements for more information).
mmacrypt
08-01-2010, 05:52 AM
Thanks Mosh for the Update, mine went to crap tonight but I'm not sure if it's what you are talking about or not. It's still posting to Twitter but I'm getting this now.
Internal Server Error on line 229 in /home6/mmacrypt/public_html/forum/twitter.php
#0 /home6/mmacrypt/public_html/forum/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /home6/mmacrypt/public_html/forum/newthread.php(262) : eval()'d code(31): Twitter->updateStatus('Rampage? Jackso...')
#2 /home6/mmacrypt/public_html/forum/newthread.php(262): eval()
#3 {main}
Warning: Invalid error type specified in [path]/vb/vb.php on line 284
IsMaR
08-01-2010, 10:45 AM
I am going to remind everyone who insists on installing this hack yet again, that it will just stop working in less than three (3) weeks time:
IMPORTANT NOTICE: On Monday 16th August 2010 this hack will cease to work unless the author updates this hack to use OAuth authentication, as that is the date Twitter is turning off Basic authentication (which is what this hack is currently using) and thus only allowing the use of OAuth authentication (see this announcement by Twitter - http://dev.twitter.com/announcements for more information).
You going to make updated version?
You going to make updated version?
This is not my hack, so the hack author needs to update this hack to work with OAuth authentication.
However, I upgraded my hack to use OAuth authentication a month ago, see my vBulletin2Twitter hack for more information.
doobiefillin
08-02-2010, 03:01 AM
is there any way to focus my tweets to new threads made in a specific forum instead of the whole site?
will this mod be supported for future Twitter updates?
godtfred
08-02-2010, 01:56 PM
Brilliant,works like a charm, thanks.
Generates a lot more traffic too !!
microlight
08-05-2010, 07:28 PM
Thanks, worked a tread once I'd stopped the shortening of the threads.
paradox1666
08-06-2010, 11:34 AM
please help me as ap
error:
Warning: in_array() [function.in-array]: Wrong datatype for second argument in [path]/newthread.php(274) : eval()'d code on line 4
my hook code:
if (!in_array($foruminfo[forumid], $excludedForums)) {
$shortUrl = 'http://www.domain.com/showthread.php?t='.$newpost[threadid];
caciocode
08-09-2010, 02:17 AM
I get this error:
Fatal error: Class 'Twitter' not found in *REMOVED*sheersoftware.com/newthread.php(273) : eval()'d code on line 17
Please help. Great mod by the way.
caciocode
08-09-2010, 02:19 AM
I have uploaded the files in the root directory.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.