bettiolo / oauth-signature-js

JavaScript OAuth 1.0a signature generator (RFC 5849) for node and the browser
https://www.npmjs.com/package/oauth-signature
BSD 3-Clause "New" or "Revised" License
232 stars 72 forks source link

"url is not a function" error #18

Open rufengch opened 8 years ago

rufengch commented 8 years ago

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

bettiolo commented 8 years ago

Can you share some example code with me?

rufengch commented 8 years ago

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".

nunoarruda commented 8 years ago

Same error here....

bettiolo commented 8 years ago

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

gabriel-anglada commented 8 years ago

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

bettiolo commented 8 years ago

Thank you @gabrielAnglada

springpriyanshi commented 7 years ago

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 commented 7 years ago

Done guys just saw yelpurl changes Thanks