Permalink
Browse files

Updated EpiTwitter for API v1.0 compatibility.

This change allows version 1.1 to work, while still allowing the default (version 1.0) to work as expected.
  • Loading branch information...
1 parent c3e3357 commit 34ba9c73aab4c37ef40a4e22113da8fa0781b94c @aaronwaldon aaronwaldon committed Feb 26, 2013
Showing with 12 additions and 2 deletions.
  1. +12 −2 EpiTwitter.php
View
@@ -18,10 +18,15 @@ class EpiTwitter extends EpiOAuth
protected $accessTokenUrl = 'https://api.twitter.com/oauth/access_token';
protected $authorizeUrl = 'https://api.twitter.com/oauth/authorize';
protected $authenticateUrl= 'https://api.twitter.com/oauth/authenticate';
- protected $apiUrl = 'https://api.twitter.com';
+ protected $apiUrl = 'http://api.twitter.com';
protected $userAgent = 'EpiTwitter (http://github.com/jmathai/twitter-async/tree/)';
- protected $apiVersion = '1.1';
+ protected $apiVersion = '1';
protected $isAsynchronous = false;
+ /**
+ * The Twitter API version 1.0 search URL.
+ * @var string
+ */
+ protected $searchUrl = 'http://search.twitter.com';
/* OAuth methods */
public function delete($endpoint, $params = null)
@@ -55,6 +60,11 @@ public function post_basic($endpoint, $params = null, $username = null, $passwor
return $this->request_basic('POST', $endpoint, $params, $username, $password);
}
+ public function useApiUrl($url = '')
+ {
+ $this->apiUrl = rtrim( $url, '/' );
+ }
+
public function useApiVersion($version = null)
{
$this->apiVersion = $version;

0 comments on commit 34ba9c7

Please sign in to comment.