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

edited March 2007 in Vanilla 1.0 Help
I think this should be easy for an programmer by using the twitter-API - and usefull for me :-)

Comments

  • Or is there simply a way to call http://twitter.com/statuses/update.xml?status=topictitle when a new topic is written?
  • in the CommentManager, there is a PostSaveNewComment delegate that you could attach to. Not sure how to tell if its a new discussion or just a comment though.
  • edited March 2007
    I've found that - but I'm really not familiar with the way vanilla triggers something. There is a simple way to update twitter with php, but I cant't figure out how to include that :-/

    <?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 ); ?>
  • edited March 2007
    Maybe? You would probably have to set your twitter email and password inside twitter.php.
    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');
  • Let's do this. It's an awesome way to attract traffic to your forum.

    "New discussion on yoursite.com - discussion topic - link"
  • oliverraduneroliverraduner ✭✭
    edited August 2010
    @Daniel @WallPhone & @Raize
    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?
  • @oliverraduner

    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...
  • p.s. i miss @wallphone
Sign In or Register to comment.