[ 
https://issues.apache.org/jira/browse/CB-9144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

jcesarmobile closed CB-9144.
----------------------------
    Resolution: Invalid

closing as invalid since it looks like a bug on the plugin and the twitter api 
no longer exists

> Error 32 ( Authentication Error ) on Twitter Search API
> -------------------------------------------------------
>
>                 Key: CB-9144
>                 URL: https://issues.apache.org/jira/browse/CB-9144
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-js
>            Reporter: ari suwendi
>            Priority: Major
>
> From: https://github.com/nraboy/ng-cordova-oauth/issues/64
> Problem: "Data: {"errors":[{"code":32,"message":"Could not authenticate 
> you."}]}" from $http.get(url)... on iOS where var url = 
> 'https://api.twitter.com/1.1/search/tweets.json?q=%40twitterapi'; (Twitter 
> Search API)
> I call this prior to the API call:
> function createTwitterSignature(method, url, queryObj) {
>     var token = angular.fromJson(getStoredToken());
>     var oauthObject = {
>         oauth_consumer_key: clientId,
>         oauth_nonce: $cordovaOauthUtility.createNonce(10),
>         oauth_signature_method: "HMAC-SHA1",
>         oauth_token: token.oauth_token,
>         oauth_timestamp: Math.round((new Date()).getTime() / 1000.0),
>         oauth_version: "1.0"
>     };
>     var signatureObj = $cordovaOauthUtility.createSignature(method, url, 
> oauthObject, queryObj, clientSecret, token.oauth_token_secret);
>     $http.defaults.headers.common.Authorization = 
> signatureObj.authorization_header;
> }
>  it seems that this problem is triggered IF the query param contains special 
> character that changes on URL encoding. On further investigation it's because 
> the oauth signature generated by cordova 
> ($cordovaOauthUtility.createSignature, most likely caused by the 
> encoding-decoding algorithms/process) does NOT match the signature generated 
> by twitter - this mismatch causes this error 32.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to