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)

Flep 01-29-2010 06:57 AM

@ buro9
I fixed it.
I am using the following classes:
http://code.google.com/p/bitly/
http://twitter.slawcup.com/twitter.class.phps
My vbulletin plugin becomes:
PHP Code:

$excludedForums = array(0); 
     
    if (!
in_array($foruminfo[forumid], $excludedForums)) { 
        
$shortUrl 'http://www.yourforumsdomain.com/showthread.php?t='.$newpost[threadid];
     
        include 
'BitLy.php'
        
$bitly = new Bitly('<bit.ly username>''<bit.ly API key>'); 
        
$shortUrl $bitly->shortenSingle($shortUrl);  
     
        
$tweet ''
        if (isset(
$newpost['prefixid']) && $newpost['prefixid'] != '') { 
            
$tweet $vbphrase['prefix_'.$newpost['prefixid'].'_title_plain'].' '
        } 
        
$tweet .= $newpost['title'].' '.$shortUrl;
     
    include 
'twitter.php'
    
$t= new twitter();  
    
$t->username='twitter username';  
    
$t->password='twitter password';  
    
$t->update($tweet); 
    } 


Athena1984 01-29-2010 12:06 PM

I am not getting any errors but I am not getting any updates either. I'm sure I've done everything according to the instructions.

cagbaazee 01-29-2010 01:16 PM

Sorry .. too bad.. it doesnot works, after i follow the instruction..

pepsicola38 01-29-2010 02:30 PM

This sounds cool I will try it out tomorrow (too tired now.) Is it possible to have it tweet blog and/or cms articles also? or only threads? Either way I will try it out tomorrow!

Moondust 01-29-2010 04:40 PM

We can only feed new threads..... bu we can we feed answers in Threads ?

Jesh 01-29-2010 06:14 PM

Quote:

Originally Posted by Athena1984 (Post 1969748)
I am not getting any errors but I am not getting any updates either. I'm sure I've done everything according to the instructions.

I had the same issue, was missing a closing } at the end, did not copy/paste correctly from the code. I'm surprised it didnt give me an error with the statement not being closed.

DUI_ 01-29-2010 09:17 PM

I have attached the error I am receiving after posting a thread. The thread posts correctly but does not send to twitter. Any advice?

tobe12 01-29-2010 10:36 PM

I am getting the following error after posting a new thread:
Fatal error: Call to undefined function curl_init() in /home/ddddd/public_html/forums/bitly.php on line 145

zachsg 01-29-2010 10:51 PM

Quote:

Originally Posted by Jesh (Post 1969942)
I had the same issue, was missing a closing } at the end, did not copy/paste correctly from the code. I'm surprised it didnt give me an error with the statement not being closed.

I fixed my issue as well, though my problem was I didn't comment out the description at the top. Commented that out and it works amazingly.

Thanks!

Videx 01-30-2010 01:52 AM

Well, I swear I've been over my code 10 times with a fine tooth code-comb and it's fine. And I even had bit.ly reset my API. But I'm still getting the auth errors "You must be authenticated to access shorten on line 193 in ...".

I can disable bit.ly and the twitter stuff works.

I wonder: Can I simply exclude my Admin category number, rather than excluding each separate forum under it (moderators, super moderators, etc.)?

edit: No, you cannot exclude categories. You must list each separate forum.


All times are GMT. The time now is 09:30 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.01691 seconds
  • Memory Usage 1,749KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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