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)

nyenius 06-23-2012 05:45 PM

I just think is possible because everyone seems succeed installing this mod. It's strange that the problem seems different from one person and another.

ok I'll try the mod that you refer to. thanks :)

cuco88 06-24-2012 07:40 AM

Quote:

Originally Posted by nyenius (Post 2342337)
first time I encountered this error, it was the bitly disabled. then I enabled it, still the same message. Is it the hosting configuration?

Yeah. This happens if your hoster has no JSON support for PHP.

Quote:

Originally Posted by Videx (Post 2342362)
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

Have you seen this post? https://vborg.vbsupport.ru/showpost....&postcount=594 this plugin works!
And the plugin you mention will not work either for nyenius...

nyenius 06-24-2012 10:23 AM

I haven't try the 2nd mod yet, but i know what to do, i have to contact my hosting provider :)

CubicWebs 07-17-2012 05:25 PM

UN-Installed and installed another one.

mrkati 08-05-2012 09:31 AM

Hi I get this error when I open a new thread:

"Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in C:\Inetpub\vhosts\miskiniz.com\httpdocs\bitly.php on line 80"

Any ieas?

draver 10-04-2012 09:12 AM

Sometimes i got an error message in my server log:

PHP Fatal error: Call to undefined function curl_init() in /var/www/xxx/includes/bitly.php on line 138, referer: http://www.meine-domain.de/newthread...newthread&f=17

How can i fix the problem?

sticky 10-05-2012 11:51 PM

Can this do twitter updates to different accounts from different forums?

Like an off topic twitter account for the off topic forum only for example?

Videx 10-06-2012 01:04 AM

Quote:

Originally Posted by sticky (Post 2371079)
Can this do twitter updates to different accounts from different forums?

Like an off topic twitter account for the off topic forum only for example?

No.

sticky 10-06-2012 03:44 AM

Quote:

Originally Posted by Videx (Post 2371085)
No.

Bummer, clumping everything in one account doesn't make too much sense for diverse forums.

Videx 10-07-2012 12:19 AM

Quote:

Originally Posted by sticky (Post 2371102)
Bummer, clumping everything in one account doesn't make too much sense for diverse forums.

An interesting concept. Instead of instant notification via email, a sort of instant notification via Twitter. Probably nothing you couldn't do with hashtags though, without the need to set up a separate Twitter account for each forum.

I don't think it would work on our forum (a local community site). The users are barely able to understand the concept of email subscriptions. I seriously doubt many of them could handle some sort of Twitter client for that.

In my own case, It would work fine on my desktop where I have Trillian displaying tweets on my second monitor. But I rarely run Twitter when on mobile, so would be a huge fail compared to instant email notifications.

sticky 10-09-2012 12:49 AM

Quote:

Originally Posted by Videx (Post 2371278)
An interesting concept. Instead of instant notification via email, a sort of instant notification via Twitter. Probably nothing you couldn't do with hashtags though, without the need to set up a separate Twitter account for each forum.

I don't think it would work on our forum (a local community site). The users are barely able to understand the concept of email subscriptions. I seriously doubt many of them could handle some sort of Twitter client for that.

In my own case, It would work fine on my desktop where I have Trillian displaying tweets on my second monitor. But I rarely run Twitter when on mobile, so would be a huge fail compared to instant email notifications.

Well if you use something like VB Cerberus to split your forums up as is separate Twitter accounts are already being used. Hash tags just won't do it.

I'm sure this could be modified to do what I'm asking by someone.

Videx 10-09-2012 12:18 PM

Quote:

Originally Posted by sticky (Post 2371675)
I'm sure this could be modified to do what I'm asking by someone.

Maybe, but this one hasn't worked at all in a long time and the coder isn't around any longer. Thank goodness he labeled it 'reusable code' before he left!

Personally, I would like to see any such mod also include Facebook posts. Right now it's way too difficult. I can't even begin to imagine how you would handle multiple accounts on FB or even if they allow it.

sticky 10-10-2012 04:04 AM

Quote:

Originally Posted by Videx (Post 2371768)
Maybe, but this one hasn't worked at all in a long time and the coder isn't around any longer. Thank goodness he labeled it 'reusable code' before he left!

Personally, I would like to see any such mod also include Facebook posts. Right now it's way too difficult. I can't even begin to imagine how you would handle multiple accounts on FB or even if they allow it.

So with no updates does this still work? Or is there another mod?

Videx 10-10-2012 01:51 PM

Quote:

Originally Posted by sticky (Post 2371920)
So with no updates does this still work? Or is there another mod?

If you read back you'll find that a few people have managed to hack the heck out of it and get it working. But there's an actual working and supported product at: WS vBulletin Tweet Poster

sticky 10-10-2012 07:15 PM

Quote:

Originally Posted by Videx (Post 2372021)
If you read back you'll find that a few people have managed to hack the heck out of it and get it working. But there's an actual working and supported product at: WS vBulletin Tweet Poster

Thank you.

Spangle 03-02-2013 08:59 PM

Had to disable this as it's not working on 4.2 patch 3

First error was require once file not found on line 29 newthread .php

Think I sorted that out, then I got an error about an unexpected T in Twitter.php on line2

Videx 03-02-2013 10:40 PM

Quote:

Originally Posted by Spangle (Post 2407441)
Had to disable this as it's not working on 4.2 patch 3
...

Don't ever install a mod without reading the entire thread. Or at least the last few pages. In your case, you seemed to have even missed my post just two above yours!

betts02 03-12-2013 03:28 PM

INVALID_LOGIN on line 219 in /home3/nextgen6/public_html/forums/bitly.php
#0 /home3/nextgen6/public_html/forums/bitly.php(470): Bitly->doCall('shorten', Array)
#1 /home3/nextgen6/public_html/forums/newthread.php(277) : eval()'d code(14): Bitly->shorten('http://www.next...')
#2 /home3/nextgen6/public_html/forums/newthread.php(277): eval()
#3 {main}

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

Any ideas on whats wrong here please ? Cheers

Videx 03-12-2013 04:09 PM

Quote:

Originally Posted by betts02 (Post 2409509)
Any ideas on whats wrong here please ? Cheers

I don't mind repeating myself for newbies (much). But as a coder you really should know better than to basically post "it doesn't work", especially for a mod that hasn't worked in ages.

If I can assume that as a coder you read this entire thread before installing, including my post immediately before yours, then you really need to post some more info about what you've done so far to get it working. The mod is marked as reusable, so you're welcome to try fixing it, but really your efforts might be better spent on a mod to post to Facebook right now.

betts02 03-12-2013 04:39 PM

Firstly where in your infinite wisdom do you see me posting "It Doesn't work" ?
Exactly, I never posted that, I simply posted the error i got and asked if anyone had any ideas

Secondly as a coder i made a couple of simple HTML edits which i shared with the community and which is why i got placed in the 'Coder' usergroup

Thirdly i do not want anything from my site posted to facebook as everything that gets posted on my twitter account gets automatically posted to my facebook account

Fourthly i have read every page and see some have no issues or have at least got it working, I do not wish to use the other mod as it is different to this

So in all of that, Please think before you reply

RFLIndustries 05-20-2013 09:35 PM

I'm getting the error of

Could not authenticate you on line 204 in /home/bullpen/public_html/twitter.php
#0 /home/bullpen/public_html/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /home/bullpen/public_html/newthread.php(277) : eval()'d code(57): Twitter->updateStatus('testing http://...')
#2 /home/bullpen/public_html/newthread.php(277): eval()
#3 /home/bullpen/public_html/vbseo.php(1398): require('/home/bullpen/p...')
#4 {main}


Fatal error: Could not authenticate you on line 204 in [path]/twitter.php in [path]/vb/vb.php on line 286

I know it says its not supported. but hopefully somebody has some ideas.

Videx 05-20-2013 10:29 PM

Quote:

Originally Posted by RFLIndustries (Post 2423255)
I know it says its not supported. but hopefully somebody has some ideas.

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

Ross L 05-25-2013 08:23 PM

Quote:

Originally Posted by cuco88 (Post 2340684)
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 :)

I followed your instructions and I am getting the following error on submission:

Fatal error: Namespace declaration statement has to be the very first statement in the script in /home/xxxx/public_html/twitter.php on line 2

Any ideas on what could be causing this?

Thanks in advance.

Black Tiger 07-04-2013 08:57 AM

Does this still work after Juli 1st this year or in any case since twitter isn't using api 1.0 anymore?
Because the other similar mods are not working anymore.

Videx 07-04-2013 10:26 AM

Quote:

Originally Posted by Black Tiger (Post 2432004)
Does this still work after Juli 1st this year or in any case since twitter isn't using api 1.0 anymore?
Because the other similar mods are not working anymore.

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

Black Tiger 07-04-2013 11:41 AM

Thank you!

Black Tiger 07-10-2013 11:34 PM

Pity though, that one only posts thread titles, no mod with part threads anymore.:(

Joe Pimms 09-03-2013 03:33 PM

is there an update to use google

Videx 09-03-2013 04:41 PM

No updates, but it is reusable code and that sounds like a great idea. I'm good for some money to hire a coder.

giaco750 01-09-2014 02:41 AM

Is there a way that we can authorize before it gets tweeted on twitter TWEET :)?

demdev 01-12-2014 04:16 PM

Awesome, thanks for the hack!

Wajow-community 01-13-2014 01:01 PM

I get when i make a thread a white page on my forum what i do wrong? its stay on newthread.php?do=postthread&f=25

Wajow-community 01-13-2014 01:23 PM

Quote:

{"errorCode": 0, "errorMessage": "", "results": {"http://www.forums.domein.nl/showthread.php?t=2782": {"userHash": "1lUV7TQ", "shortKeywordUrl": "", "hash": "1lUV7TS", "shortCNAMEUrl": "http://bit.ly/1lUV7TQ", "shortUrl": "http://bit.ly/1lUV7TQ"}}, "statusCode": "OK"}Invalid JSON-response on line 196 in /home/admin/domains/domein.nl/public_html/forums/bitly.php
#0 /home/admin/domains/domein.nl/public_html/forums/bitly.php(382): Bitly->doCall('shorten', Array)
#1 /home/admin/domains/domein.nl/public_html/forums/newthread.php(277) : eval()'d code(33): Bitly->shorten('http://www.foru...')
#2 /home/admin/domains/domein.nl/public_html/forums/newthread.php(277): eval()
#3 {main}


Fatal error: Invalid JSON-response on line 196 in [path]/bitly.php in [path]/vb/vb.php on line 286
#0 vb_error_handler(256, Invalid JSON-response on line 196 in /home/admin/domains/domein.nl/public_html/forums/bitly.php , /home/admin/domains/domein.nl/public_html/forums/vb/vb.php, 286, Array ([exception] => BitlyException Object ([] => Invalid JSON-response,[] => ,[] => 0,[] => /home/admin/domains/domein.nl/public_html/forums/bitly.php,[] => 196,[] => Array ([0] => Array ([file] => /home/admin/domains/domein.nl/public_html/forums/bitly.php,[line] => 382,[function] => doCall,[class] => Bitly,[type] => ->,[args] => Array ([0] => shorten,[1] => Array ([longUrl] => http://www.forums.domein.nl/showthread.php?t=2782,[history] => 1))),[1] => Array ([file] => /home/admin/domains/domein.nl/public_html/forums/newthread.php(277) : eval()'d code,[line] => 33,[function] => shorten,[class] => Bitly,[type] => ->,[args] => Array ([0] => http://www.forums.domein.nl/showthread.php?t=2782)),[2] => Array ([file] => /home/admin/domains/domein.nl/public_html/forums/newthread.php,[line] => 277,[function] => eval)),[] => ),[code] => 256)) #1 trigger_error(Invalid JSON-response on line 196 in /home/admin/domains/domein.nl/public_html/forums/bitly.php , 256) called at [/home/admin/domains/domein.nl/public_html/forums/vb/vb.php:286] #2 vB::handleException(BitlyException Object ([] => Invalid JSON-response,[] => ,[] => 0,[] => /home/admin/domains/domein.nl/public_html/forums/bitly.php,[] => 196,[] => Array ([0] => Array ([file] => /home/admin/domains/domein.nl/public_html/forums/bitly.php,[line] => 382,[function] => doCall,[class] => Bitly,[type] => ->,[args] => Array ([0] => shorten,[1] => Array ([longUrl] => http://www.forums.domein.nl/showthread.php?t=2782,[history] => 1))),[1] => Array ([file] => /home/admin/domains/domein.nl/public_html/forums/newthread.php(277) : eval()'d code,[line] => 33,[function] => shorten,[class] => Bitly,[type] => ->,[args] => Array ([0] => http://www.forums.domein.nl/showthread.php?t=2782)),[2] => Array ([file] => /home/admin/domains/domein.nl/public_html/forums/newthread.php,[line] => 277,[function] => eval)),[]
i have this error?? what now?

nxtgen 01-13-2014 02:47 PM

Interesting. No errors.. Details are correct.. Is there a log somewhere so I can see what is failing?

Wajow-community 01-13-2014 03:00 PM

Quote:

Originally Posted by nxtgen (Post 2473976)
Interesting. No errors.. Details are correct.. Is there a log somewhere so I can see what is failing?

I will also do everything apart properly followed and filled ..

I use vbulletin 4.2.1 and when I do I immediately the subject site is redirected to the error that I mentioned above.

Videx 01-13-2014 05:35 PM

Quote:

Originally Posted by Wajow-community (Post 2473966)
i have this error?? what now?

If you read back you'll find that a few people have managed to hack the heck out of it and get it working. But there's an actual working and supported product at: WS vBulletin Tweet Poster

Wajow-community 01-14-2014 06:46 PM

Quote:

Originally Posted by Videx (Post 2474004)
If you read back you'll find that a few people have managed to hack the heck out of it and get it working. But there's an actual working and supported product at: WS vBulletin Tweet Poster

the same error as this one.

webmaster74 03-08-2014 10:46 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!

...... and we only discover this after spending an hour doing the changes and another hour reading the support........ thank you. This statement must appear in big bold red in the FIRST post.


All times are GMT. The time now is 05:55 PM.

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.02129 seconds
  • Memory Usage 1,864KB
  • 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
  • (1)bbcode_php_printable
  • (20)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (38)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