Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
New Discussions Twitter Feed
Say I wanted to setup a Twitter account that automatically tweeted every new thread that was Discussion, how would I do this?
Initially I thought to convert the RSS feed into a Twitter feed using Zapier or something, but the RSS contains more than just new discussions.
Ideas?
0
Comments
Sure! Look at that code and just ask if you have further questions:
Is this a good idea? You probably want to limit to set author an categories.
There is more value on others choosing to share link through their twitter, rather than spamming your own twitter.
grep is your friend.
I totally agree! And I thought it would be a nice plugin to write and that's why I started to do right that. Here is the setting screen which reflects your concerns
I've added a "Only twitter announcements" to the settings because I think that might be a useful option.
Now there is something to do on
postController_discussionFormOptions_handler
and I think some validation beforeSaveDiscussion would be good UX but the complexity is still okay.I do not use Twitter so that will be the hardest part to test
Just in case I never finish it: https://github.com/R-J/TwitterBot
It should be quite usable if it would be able to post to Twitter! As far as I can tell that functionality is the only thing left, but I haven't made any tests. Don't know if I really should create a Twitter account just to create a plugin like that...
I guess making the text which should be posted to Twitter configurable would be another nice feature.
I think I'll invest some time more, but it is already a better skeleton than that of my first post in this discussion...
This forum is amazing O_O thanks for the quick work!
Also yes @x00 I understand this isn't for everyone, but some people just gotta know what's going on ASAP!
Oh, didn't read your last post. So it's not actually working yet...?
Also do you need to do this via a Twitter application, wouldn't it be simpler just to ask for a Twitter account credentials (I have no idea, just wondering out loud).
No, not working - just good looking
But I've registered a Twitter account and will look into how to do simple posts
Oh, I'm such a Twitter noob! "Tweets" are limited to 140 characters, correct? So do you have an idea how a tweet should communicate discussion infos? "New discussion on %homepage%: "%discussion title%" posted by %user name% on %insert date%" would be waaaaay too long...
This one is fully working: http://vanillaforums.org/addon/twitterbot-plugin
Look at line 160 to customize your tweet.
I have experience doing this. Where do I apply?
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
It works! Wonderful! FYI I went with the following for the tweet:
$tweet = ''.$title.' by '.$author.' '.$url.'';
Only issue is after submitting the new discussion, a popup box appears with nothing written in it ... any ideas?
This might happen if you have entered a
echo something
, but I would say that this is an error. Add$Configuration['Garden']['Errors']['MasterView']= 'deverror.master.php';
and set$Configuration['Garden']['Debug'] = true;
in your config.php and I assume there will be an error message in the empty popup.Maybe look first at the js error console of your browser.
Just added those two lines to the Config and the popup didn't appear at all! But the tweet didn't trigger either.
Actually it disabled the plugin, trying again...
Yeah adding that to config disables the plugin.
Have you had a look at Twitter cards created by the Articles application? E.g. something like this in your discussion's HTML head might prove useful:
Also, the way the current Vanilla 2.2 Twitter plugin extracts its tweets from a given discussion might give you helpful ideas