Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vBulletin Tweet Poster! Details »»
vBulletin Tweet Poster!
Version: 1.0.6, by Milad Milad is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.8.x Rating:
Released: 06-16-2009 Last Update: 08-05-2009 Installs: 355
DB Changes Uses Plugins Auto-Templates
Additional Files  
No support by the author.

Brought to you by Milad's vBulletin Services!

Click install to receive support & updates. Please click install before you ask for help!
You like it? nominate it.


Introduction & Description
It's amazing how twitter drives traffic to various websites around the web, so I thought it would be a very good idea to get advantage of it, because Twitter will bring us more traffic and more valuable registrations.

This add-on runs as a scheduled task every ten minutes, and posts the newly posted threads to twitter in the form:
Thread title - preview (if possible) - tiny or full URL.

Threads must be in forums viewable by guests, not private forums.

Features
  • 1.0.0
    • Post to twitter using OAuth authentication.
    • You have your own application at twitter, so the tweets will be appeared from your website name. tweet.jpg
    • Only guest-accessible stuff is posted at Twitter.
    • Integrated with bit.ly to shorten the thread URL, giving more space for title and preview.
    • Set it up once, and forget it. twitter's access token doesn't expire, unless you revoke the access permission.
  • 1.0.2
    • You can set from which forums the threads will be tweeted. (See the page where you edit the forum info and settings forum_option.jpg)
    • vBSEO compatible (if available), so the URLs are rewritten before they get shortened. This will help to reduce the number of redirects as few as possible.
    • The task prints valuable information when you run it manually, to help you diagnose problems when they happen! healthy_task_messages.jpg
  • 1.0.3
    • Non-Unicode forums can use the built-in conversion (to UTF-8) to abide by the requirement of twitter. settings.jpg
    • You can disable the automatic tweeting function, and tweet threads manually right from the first postbit. with user group over which user group can tweet manually postbit_button.jpg Attachment 100845
    • You can set threads from which user group will be tweeted. Attachment 100845
  • 1.0.5
    • Scheduled task: Post Hot threads.
    • Check port 443 on installation / upgrade.
    • The product can't be installed if cURL isn't complied into PHP.
    • Update forums / usergroups / permissions cache on successful authorization, to avoid problems with some admins, where caches don't get updated on upgrade!
    • strip_html from the preview text, for forums that enable HTML in posts.
    • Delete tweet if the thread is deleted.
    • Status Message Prefix. settings.jpg
  • 1.0.6
    • Option: to remove URLs from preview text (enabled by default).
    • Option: to have only the thread title as a tweet without any part of the message.
    • Added form (in the footer) to allow admins to tweet from any page, right in their forums, with an option to disable it, also it's enabled only for super admins. Attachment 102934

How different is this from twitterfeed.com?
  • This hack is not intended to be an alternative to twitterfeed.com, however:
  • It may be safer than giving your Twitter-Login to twitterfeed.com (by redlabour)
  • Later, this hack will include more options so you have better control over what is posted at twitter. (like post only hot threads, or threads by certain usergroup, etc.)
  • You have your own application at twitter, so the tweets will be appeared from your website name, instead of any other service. tweet.jpg

Happy Users of This Product! contact me to add your twitter account.
Requirements
  • Mandatory:
    • vBulletin 3.8.0
    • PHP 5.2.3
    • cURL & OpenSSL compiled to your PHP installation.
    • Twitter account (I've created a dedicated account for my website @syrianmeds)
  • Optional (but recommended):
    • bit.ly account to shorten URLs.
    • Your forum's character set must be UTF-8 (required by twitter) or latin with no non-English characters. Alternatively, you can use the iconv built-in function to convert the encoding.

Installation
  1. Upload the files to their respective locations.
  2. Import the XML product file: product-twitterposter.xml
  3. *Optional* go to http://bit.ly/ and register an account there, you need it to shorten the URLs!
    There are two important values here: the login username and the apiKey (you can obtain it from http://bit.ly/account/)
    settings.jpg
  4. Register your application at twitter. (You must be already registered as a regular member)
    https://twitter.com/oauth_clients/new
    screenshot1.jpg
    Pay attention to the Callback URL, it must point to the file twitterposter.php in your admincp, ex: http://www.yourdomain.com/forum/admincp/twitterposter.php
  5. After registering your application, twitter will provide two values to you (Consumer Key and Consumer Secret), keep them for use in the authorization later.
    screenshot2.jpg
  6. Go to vBulletin Tweet Poster -> Authorize.
  7. Enter the two values in there appropriate fields and submit (screenshot3.jpg). You will be given a link to twitter.com to authorize this hack (screenshot4.jpg) to post on your behave.
  8. You will be redirected to your admincp, and a "Hello World!" message will be posted to your twitter account.

Upgrade
  1. Upload the files to their respective locations.
  2. Import (Allow Overwrite: Yes!) the XML product file: product-twitterposter.xml
  3. Re-authorize the hack, to make sure everything works for you.

Troubleshooting
  • Q: I'm not seeing any updates after the one "#vBulletin Tweet Poster by http://services.milado.net/ Hello World! #testoauth".
    A: Please make sure that you have new threads in forums available to guests, otherwise the hack won't post anything.
    After that go to Admincp -> Scheduled Tasks -> Scheduled Task Manager, then find the task "vBulletin Tweet Poster" click run and see if there is any error displayed.
  • Q: I'm getting the error "Fatal error: Call to undefined function curl_init() in /home/investme/forums/includes/twitterposter/twitteroauth/twitterOAuth.php on line 126"
    A: That error says that you don't have cURL installed on your server. If you have a dedicated server/vps, install and compile curl, if you're on shared/reseller hosting, contact your host and ask if they can install cURL support. (thanks stapler2025 for answering on my behave)
  • Q: I receive the following error:
    HTML Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <hash>
    <request>/statuses/update.xml</request>
    <error>Read-only application cannot POST</error>
    </hash>
    A: You have to enable write & read for your application at twitter, so go here, edit your application access setting and request new consumer key and token. If it didn't work, please delete the application, add a new one and use my settings from the screen shots.

Credits
I've used the Twitter's OAuth library, by Abraham Williams | http://abrah.am | @abraham

Change log
  • 1.0.0 first public release (beta) Jun, 17th 2009
  • 1.0.1 (beta) Jun, 17th 2009
  • 1.0.2 (beta) Jun, 18th 2009
  • 1.0.3 (beta) Jun, 21th 2009
    • Implementation of iconv conversion for non-unicode forums.
    • Control threads by which usergroups will be posted to twitter.
    • Tweet threads in forums manually instead of it being automatic. postbit_button.jpg
  • 1.0.4 (beta) Jun, 22th 2009
    • Bug fixed: Manual tweeting doesn't show thread preview!
    • Bug fixed: Plugin overwrites the hook: $template_hook['postbit_controls']
  • 1.0.5 (beta) Jul, 23th 2009
    • Renamed function_twitterposter.php to functions_twitterposter.php
    • Moved some functions from functions_twitterposter.php to a new class in class_twitterposter.php (New PHP class is created, first step to move to OOP).
    • Canceled the redirection to twitter (on authorization), and replaced with a link opening in a new tab / window.
    • New scheduled task: Post Hot threads.
    • New: Check port 443 on installation / upgrade.
    • New: The product can't be installed if cURL isn't complied into PHP.
    • New: Update forums / usergroups / permissions cache on successful authorization, to avoid problems with some admins, where caches don't get updated on upgrade!
    • New feature: strip_html from the preview text, for forums that enable HTML in posts.
    • New feature: Delete tweet if the thread is deleted.
    • New feature: Status Message Prefix.
  • 1.0.6 (RC1) Aug, 6th 2009
    • Add phrase 'HOT:'.
    • Improve bit.ly class a bit.
    • Push the plug-in at hook (postbit_display_complete) to run lastly, to put the tweet button at the last.
    • Include an option to remove URLs from preview text.
    • Option: to have only the thread title as a tweet without any part of the message.
    • Added form (in the footer) to allow admins to tweet from any page, right in their forums, with an option to disable it, also it's enabled only for super admins. Attachment 102934
  • 1.0.7 (RC2) to be released.
    • Bug fixed: improperly cached template.
    • Bug fixed: Hot Threads Look up Time Span.
    • New feature: Include thread prefix in the tweet.

Download Now

File Type: zip vBulletin Tweet Poster 1.0.6.zip (31.0 KB, 1898 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #662  
Old 10-19-2012, 12:02 PM
Black Tiger's Avatar
Black Tiger Black Tiger is offline
 
Join Date: Apr 2004
Location: Netherlands
Posts: 957
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep, I will wait for a fix for this too.
Maybe somebody finds out and can make a "find this and replace with such" kind of manual for us.
Reply With Quote
  #663  
Old 10-22-2012, 08:34 AM
nick-harper nick-harper is offline
 
Join Date: Jun 2008
Posts: 163
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anybody found a fix for this as yet
Reply With Quote
  #664  
Old 10-22-2012, 07:41 PM
CristianoDiaz CristianoDiaz is offline
 
Join Date: Jun 2007
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found the solution to the problem.

You have to change the URLs in several files:

In includes\twitterposter\twitteroauth\twitterOAuth.p hp

Change:

public static $TO_API_ROOT = "https://twitter.com";

To:

public static $TO_API_ROOT = "https://api.twitter.com";

In includes\twitterposter\class_twitterposter.php

Change:

$content = $this->twitter_api('https://twitter.com/statuses/update.xml', array('status' => $this->status), 'POST');

To:

$content = $this->twitter_api('https://api.twitter.com/1/statuses/update.xml', array('status' => $this->status), 'POST');

Also change:

$content = $this->twitter_api('https://twitter.com/statuses/destroy/' . $this->statusid . '.xml', array(), 'POST');

To:

$content = $this->twitter_api('https://api.twitter.com/1/statuses/destroy/' . $this->statusid . '.xml', array(), 'POST');

==

That's it - I ran the scheduled task and the new threads went through to Twitter again. The key is not just the change to api.twitter.com, but on the two actual API calls, putting a /1/ before the API function. They added versioning to the API calls (but don't add it on the OAuth call).

Hope that helps - it fixed it in my forum running 3.8
Reply With Quote
7 благодарности(ей) от:
Black Tiger, EWGF, Goomzee, jimsflies, mykkal, ShawneyJ, Simon Lloyd
  #665  
Old 10-22-2012, 09:32 PM
Black Tiger's Avatar
Black Tiger Black Tiger is offline
 
Join Date: Apr 2004
Location: Netherlands
Posts: 957
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Christiano, you're the best! I also got 3.8.x running. Thank you very much for sharing your solution with us!!
Working like a charm again!
Reply With Quote
  #666  
Old 10-23-2012, 12:21 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CristianoDiaz View Post
That's it - I ran the scheduled task and the new threads went through to Twitter again. The key is not just the change to api.twitter.com, but on the two actual API calls, putting a /1/ before the API function. They added versioning to the API calls (but don't add it on the OAuth call).

Hope that helps - it fixed it in my forum running 3.8
Funny, i did all that a week ago but it didnt work, howvere i've just removed the change from OAuth and it worked, thanks
Reply With Quote
  #667  
Old 11-05-2012, 08:16 AM
sleepyboy2004 sleepyboy2004 is offline
 
Join Date: Nov 2008
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I made all my changes, however, when I try to authorize my Keys, on Fire fox it takes me to just a blank screen and on IE it gives me =/

The website cannot display the page

HTTP 500

Most likely causes:
•The website is under maintenance.
•The website has a programming error.

What you can try:
Refresh the page.
Go back to the previous page.
Reply With Quote
  #668  
Old 11-05-2012, 08:23 AM
sleepyboy2004 sleepyboy2004 is offline
 
Join Date: Nov 2008
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If possible to manually authorize it by entering the info on a file and uploading it to the server? or forcing it?
Reply With Quote
  #669  
Old 11-28-2012, 07:01 PM
mykkal's Avatar
mykkal mykkal is offline
 
Join Date: May 2007
Location: Atlanta, GA
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was able to get twitter posting again using the solution Cristan gave however hash tags aren't working. It's posting the link instead of the link plus hash tag. Does anyone know how to fix that?

Example: BOSTON MODELS $1000 to $1300 http://bit.ly/VCOESi

SHOULD BE

#CASTING BOSTON MODELS $1000 to $1300 http://bit.ly/VCOESi

Quote:
Originally Posted by CristianoDiaz View Post
I found the solution to the problem.

You have to change the URLs in several files:
Reply With Quote
  #670  
Old 05-26-2013, 08:37 PM
SonSahne SonSahne is offline
 
Join Date: Feb 2008
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
For some reason, authorization failed! I don't know!
Enough!
Reply With Quote
  #671  
Old 05-26-2013, 09:03 PM
mykkal's Avatar
mykkal mykkal is offline
 
Join Date: May 2007
Location: Atlanta, GA
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SonSahne View Post
Enough!
LOL it hasn't worked for a while. You have to use twitterfeed.com because they keep it working & authenticating.


This plugin hasn't been updated for a while and newer versions of vbulletin have been released. 3.8.7 has reached EOL (end of life).
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:52 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07808 seconds
  • Memory Usage 2,381KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_html
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (7)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete