Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update Twitter API

Correct calls to version 1 of the API so they point to version 1.1.
  • Loading branch information...
commit 6bd442ac1aca3740171c92da8cf32b8c9cd1720c 1 parent 9f7a2b1
Michael Sisk authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  -/php/config.php
  2. +2 −2 webcomic.php
View
2  -/php/config.php
@@ -1592,7 +1592,7 @@ public static function ajax_twitter_account( $consumer_key, $consumer_secret, $c
update_option( 'webcomic_options', self::$config );
- $code = $oauth->request( 'GET', $oauth->url( '1/account/verify_credentials' ) );
+ $code = $oauth->request( 'GET', $oauth->url( '1.1/account/verify_credentials' ) );
if ( 200 === intval( $code ) ) {
$response = json_decode( $oauth->response[ 'response' ] );
View
4 webcomic.php
@@ -614,7 +614,7 @@ public function twitter_oauth() {
$oauth->config[ 'user_token' ] = $response[ 'oauth_token' ];
$oauth->config[ 'user_secret' ] = $response[ 'oauth_token_secret' ];
- $code = $oauth->request( 'GET', $oauth->url( '1/account/verify_credentials' ) );
+ $code = $oauth->request( 'GET', $oauth->url( '1.1/account/verify_credentials' ) );
if ( 200 === intval( $code ) ) {
$response = json_decode( $oauth->response[ 'response' ] );
@@ -1104,7 +1104,7 @@ public function tweet_webcomic( $new, $old, $post ) {
'status' => substr( strip_tags( $status ), 0, 140 )
), true, true );
} else {
- $code = $oauth->request( 'POST', $oauth->url( '1/statuses/update' ), array(
+ $code = $oauth->request( 'POST', $oauth->url( '1.1/statuses/update' ), array(
'status' => substr( strip_tags( $status ), 0, 140 )
) );
}
Please sign in to comment.
Something went wrong with that request. Please try again.