Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Composer in 2 minutes

Db6218c1b56d64e775eb79ea4f2889dd?s=47 Sebastian
October 10, 2013

Composer in 2 minutes

Showing how to tweet from PHP in 2 minutes. Using composer, adding a package which does the interaction with the twitter API, it's that easy!
This talk was aimed at developers not familiar with composer to get them interested. It was used as an introduction talk to ViennaPHP October 2013.



October 10, 2013


  1. composer in 2 minutes @Sgoettschkes

  2. Lets make music!

  3. Install composer curl -sS https://getcomposer. org/installer | php

  4. Install dg/twitter-php { "require": { "dg/twitter-php": "v3.1" } } +

    composer.phar update
  5. Use it! <?php require_once __DIR__.'/vendor/autoload.php'; $twitter = new Twitter("cKey", "cSecret",

    "accessToken", "accessTokenSecret"); $twitter->send('2 minutes already?');
  6. Stop the clock! We are done!