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.jpgAttachment 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.
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.
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
Upload the files to their respective locations.
Import the XML product file: product-twitterposter.xml
*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
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
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
Go to vBulletin Tweet Poster -> Authorize.
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.
You will be redirected to your admincp, and a "Hello World!" message will be posted to your twitter account.
Upgrade
Upload the files to their respective locations.
Import (Allow Overwrite: Yes!) the XML product file: product-twitterposter.xml
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)
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
Diagnostic Information are printed in task manager for you to help diagnosing why the hack doesn't work for some admins! posts: #1831263, #1831443 and #1831460
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
Just want to say THANK YOU Milad for this hack, I installed it and it worked first time. Took me a while to work out how to manually tweet, but found it in usergroup permissions.
Curious how many posts you were sending twitter a day? Were any of them spam like? I could see how if someone spam bombs your forum, it could get out of control.
Quote:
Originally Posted by mykkal
Hey Milad. Thanks for the great work.
First, do you have a way for us to limit the amount of status updates sent per day?
we don't want to get locked out for spamming.
Quote:
Originally Posted by Habboubih
i have around 1000 new threads a day. does this hack tweet them all at the same day ?
or there is limited number of threads to be sent to twitter ?
Bro, this hack works great! Thank you very much for the hard work.
I have the same concern as these guys: is there a way to limite the amount of tweets per day? Mine it's a really big forum, and this hack looks like it's spamming.
I have the same concern as these guys: is there a way to limite the amount of tweets per day? Mine it's a really big forum, and this hack looks like it's spamming.
Twitter has pretty reasonable limitations built in, I forget what it is, maybe 60 posts per hour over an hour, maybe more I really do forget.
How can you limit the # of tweets? Really, simply. Take the most popular forums, turn the tweet ability off. Go into the forum settings, turn the auto-tweet ability off per forum. Things like the "chat forum" or "general discussion", etc don't need to be tweeted, do they? Enter self regulation there.
I agree, it might be a good idea to add this option manually, but until you do, it could be done like that.
If i take the most poppular forums, I will have to leave only "Annoucements" forums
What I just did, it's manually edit the vBulletin Tweet Poster Scheduled task, to post only twice per hour. I not sure if that will work, but I think so
If i take the most poppular forums, I will have to leave only "Annoucements" forums
What I just did, it's manually edit the vBulletin Tweet Poster Scheduled task, to post only twice per hour. I not sure if that will work, but I think so
that doesnt help, after that time, It post like hell.
Since I have my tweeter and facebook account integrated, facebook changed me the password for security reason, even they got scared
I changed to once a day, to see how will work, but I am kind of scared.
There should be a way to limit the number of tweets every hour, day, minutes, that way this hack will be prefect!
Twitter has a limit of 150 api call in an hour, I advise you to switch off the manual tweeting, and leave the tweeting of hot threads only, so you will receive more traffic for the most attractive threads in a given period (24 hours or may be less if your forums are very busy).
Please add an option to have only the topic title as a tweet and not part of the message.
+1
Having the topic itself bleed into the message is rather ugly and leads to cut off tweets. The only thing that's really needed is the title of the thread
I dont get step 3 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/)