miniblog

Unnamed repository; edit this file 'description' to name the repository.
git clone http://git.code.weiherhei.de/miniblog.git
Log | Files | Refs

Xing.class.php (845B)


      1 <?php
      2 
      3 class Xing
      4 {
      5 	public $config;
      6 
      7 	public function push()
      8 	{
      9 		require_once('network/xing/xingoauth.php');
     10 		
     11 		$connection = new XingOAuth($this->config['consumer_key'],$this->config['consumer_secret'],$this->config['oauth_token'],$this->config['oauth_token_secret']);
     12 		
     13 		/* If method is set change API call made. Test is called by default. */
     14 		
     15 		//$content = $connection->get(‘account/verify_credentials’);
     16 		
     17 		/* Some example calls */
     18 		
     19 		$praefix = $this->config['praefix_text'].' ';
     20 		$suffix  = ' '.$this->shortUrl.' '.$this->config['suffix_text'];
     21 		$text    = $praefix.substr($this->subject,0,140-strlen($praefix)-strlen($suffix)).$suffix;
     22 		
     23 		$result = $connection->post('statuses/update', array('status' => $text));
     24 		
     25 		if	( $this->debug )
     26 		{
     27 			echo '<pre>';
     28 			print_r( $result );
     29 			echo '</pre>';
     30 		}
     31 		
     32 		
     33 	}
     34 }
     35 ?>