oauth-signature-js icon indicating copy to clipboard operation
oauth-signature-js copied to clipboard

"url is not a function" error

Open rufengch opened this issue 9 years ago • 8 comments

Hi, bettiolo! In the example in README, url is defined as a string, however, in the library it is defined as a function. When I used the code from the example, the error "url is not a function" occured. Maybe you can give it a new name instead of just "url" in the example in README.

Best, Brody

rufengch avatar Jan 08 '16 01:01 rufengch

Can you share some example code with me?

bettiolo avatar Jan 11 '16 14:01 bettiolo

Yes, here you can see that I changed url to yelpURL. Before I made that change, the devtool console showed "url is not a function".

rufengch avatar Jan 15 '16 19:01 rufengch

Same error here....

nunoarruda avatar Feb 14 '16 11:02 nunoarruda

@nunoarruda thank you for the feedback, I will have a look on this ASAP.

bettiolo avatar Feb 15 '16 10:02 bettiolo

Hi! In my case, I was using cloudboost framework and it has a bug which I have just reported (https://github.com/CloudBoost/JavaScriptSDK/issues/18)

Fixing it, the error dissapears.

Hope it helps

gabriel-anglada avatar Jun 01 '16 20:06 gabriel-anglada

Thank you @gabrielAnglada

bettiolo avatar Jun 01 '16 21:06 bettiolo

Hi team,

I am still getting this error with simple integration.var httpMethod = 'GET', url = 'using rest_url', parameters = { oauth_consumer_key : oauth_consumer_key, oauth_token : oauth_token, oauth_nonce : oauth_nonce, oauth_timestamp : oauth_timestamp, oauth_signature_method : 'HMAC-SHA1', oauth_version : oauth_version
}, consumerSecret = oauth_consumer_secret, tokenSecret = oauth_token_secret, // generates a RFC 3986 encoded, BASE64 encoded HMAC-SHA1 hash encodedSignature = oauthSignature.generate(httpMethod, url, parameters, consumerSecret, tokenSecret), // generates a BASE64 encode HMAC-SHA1 hash signature = oauthSignature.generate(httpMethod, url, parameters, consumerSecret, tokenSecret, { encodeSignature: false}); Please suggest

springpriyanshi avatar Feb 26 '17 17:02 springpriyanshi

Done guys just saw yelpurl changes Thanks

springpriyanshi avatar Feb 26 '17 17:02 springpriyanshi