vBulletin Tweet Poster!

danswano

New Member
vBulletin Tweet Poster!

vBulletin Tweet Poster! - vBulletin.org Forum

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.


Thanks :)
 

dark_hunter

New Member
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. Attachment 100694
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 Attachment 100710)
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! Attachment 100725
1.0.3
Non-Unicode forums can use the built-in conversion (to UTF-8) to abide by the requirement of twitter. Attachment 100687
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 Attachment 100843 Attachment 100845
You can set threads from which user group will be tweeted. Attachment 100845

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. Attachment 100694

Happy Users of This Product! contact me to add your twitter account.
@syrianmeds

Requirements
vBulletin 3.8.0
Your forum's character set must be UTF-8 (required by twitter) or latin with no non-English characters.
PHP 5.2.3
cURL compiled to your PHP
Twitter account (I've created a dedicated account for my website @syrianmeds)
bit.ly account to shorten URLs (optional but recommended)

Installation
1) Upload the files to their respective locations.

2) Import the XML product file: product-twitterposter.xml

3) *Optional* go to bit.ly, a simple url shortener 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 bit.ly, a simple url shortener)
Attachment 100687

4) Register your application at twitter. (You must be already registered as a regular member)
https://twitter.com/oauth_clients/new

Attachment 100688

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.

Attachment 100689

6) Go to vBulletin Tweet Poster -> Authorize (Open it in a new tap / window, few users reported that it triggers an access-denied error when you run it inside the admincp) posts: #1831825 and #1831887

7) Enter the two values in there appropriate fields and submit (Attachment 100690). You will be redirected to twitter.com to authorize this hack (Attachment 100691) 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 Milad’s vBulletin Services - The proficiency & reliability you want! 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)
 
Top