Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Announce new topics via twitter
I think this should be easy for an programmer by using the twitter-API - and usefull for me :-)
0
Comments
<?php $email = $_POST['email']; $password = $_POST['password']; $status = urlencode( $_POST['status'] ); $url = "http://twitter.com/statuses/update.xml"; $session = curl_init(); curl_setopt ( $session, CURLOPT_URL, $url ); curl_setopt ( $session, CURLOPT_HTTPAUTH, CURLAUTH_BASIC ); curl_setopt ( $session, CURLOPT_HEADER, false ); curl_setopt ( $session, CURLOPT_USERPWD, $email . ":" . $password ); curl_setopt ( $session, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt ( $session, CURLOPT_POST, 1); curl_setopt ( $session, CURLOPT_POSTFIELDS,"status=" . $status); $result = curl_exec ( $session ); curl_close( $session ); ?>
function IncludeTwitterFile(&$CommentManager) { // Need to do some additional checking to see if this is a new discussion, or just a new comment here // If its a new discussion: include('twitter.php'); } $Context->AddToDelegate('CommentManager', 'PreSaveNewComment', 'IncludeTwitterFile');
"New discussion on yoursite.com - discussion topic - link"
I am not sure, if it makes sense creating kind of a plugin for vanilla for posting to Twitter. I guess it would be better relying on existing services such as twitterfeed.com (which grabs updates via the RSS feed).
What do you think about that?
twitterfeed actually turned out to be the perfect solution! everytime i make a new discussion on my forum, it makes a post to my twitter feed just like i wanted...doesn't get any easier than this
now the fun begins...