From 51459636f718b474a1934a688bf35c5c7f6823e8 Mon Sep 17 00:00:00 2001
From: "decibel.places" <rgoya@yahoo.com>
Date: Sun, 14 Oct 2012 22:58:06 -0400
Subject: [PATCH] add changes from #24

---
 twitter.lib.php |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/twitter.lib.php b/twitter.lib.php
index c50c7fd..9e09619 100644
--- a/twitter.lib.php
+++ b/twitter.lib.php
@@ -310,12 +310,22 @@ class Twitter {
       $format = $this->format;
     }
     $conf = TwitterConf::instance();
-    $url =  'http://'. $conf->get('api') .'/'. $path;
-    if (!empty($format)) {
-      $url .= '.'. $this->format;
-    }
-    return $url;
-  }
+	$args = explode("/", $path);
+//OAuth authorization
+if ( $args[0] == "oauth" ) {
+$url = 'http://'. $conf->get('api'). '/'. $path;
+}
+//Posting, user_timeline, etc..
+else {
+$url = 'http://'. $conf->get('api'). '/1/'. $path;
+
+}
+	//
+	if (!empty($format)) {
+	$url .= '.'. $this->format;
+	}
+	return $url;
+	}
 }
 
 /**
-- 
1.7.6.msysgit.0

