Exemple #1
0
 /**
  * Initialize service
  */
 public function __construct()
 {
     $this->conf = $this->config('twitter');
     if ($this->configured()) {
         Codebird::setConsumerKey($this->conf['key'], $this->conf['secret']);
         $this->cb = Codebird::getInstance();
         $this->cb->setToken($this->conf['token'], $this->conf['token_secret']);
     }
 }
Exemple #2
0
<?php

use Codebird\Codebird;
require 'vendor/autoload.php';
$cb = new Codebird();
$cb->setConsumerKey('kOgKGkmcLR2dpahK6RVFtncKD', 'rxFXj2zUv7JNtc7dT91fVgveEAMd11meu4DivPhYfD5qPcfqqz');
$cb->setToken('81057639-gztAXjV3JHUsTURXqZmD7kDYulU4RpoMxKeYCfICo', 'UTyPHmzfD1ZRJ5Bx8d7CjkFYJSVSJX04w71o6Kj1Qo8ih');
$reply = $cb->statuses_update(['status' => '4']);