New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object # has no method 'getOAuthAccessToken' #42
Comments
I think its probably related to: #39 .. ARe you using express 2 ? |
i tried updating to express 2. still the same issue. On Sun, May 8, 2011 at 3:24 AM, ciaranj <
|
Ah sorry I was concerned that you might be (i.e. that could be what was causing the issue!) Can you put your code somewhere ? |
I have two files: app.js and oauth_controller.js it works fine while retrieving the request toke and secret. it fails when trying to call getOAuthAccessToken from app.js by calling oauthController.getOAuthTokenAndSecret. thanks for your kind help. *** app.js:var express = require('express'); var app = module.exports = express.createServer(); var memStore = require('connect').session.MemoryStore; var oauthController = require('./controllers/oauth_controller'); // Configuration app.get('/user/new', function(req, res) { app.get('/user/oauth', function(req, res) {
}); *** oauth_controller.js:var OAuth = require('oauth').OAuth; exports.getRequestTokenForAuhtorization = function(callback) { var consumer_key = some_key, var oa = new OAuth(request_token_url, access_token_url, consumer_key, consumer_secret, oa.getOAuthRequestToken(function(error, request_token, request_token_secret, results) { exports.getOAuthTokenAndSecret = function(oa, request_token, request_token_secret, oauth_verifier, callback) { |
Hmmm I've only just noticed which project this issue is against, have you seen http://github.com/ciaranj/connect-auth I've got a (working!) implementation of a Twitter authentication system in there, that would almost certainly be a good place to look for clues (if not used!) |
When you inspect the 'oauthController' (console.log) what methods are on that object. I don't think this is a node-oauth issue, more an express thing ... strange. |
when i inspect oauthController, i see all methods in there. it is really this method that fails oa.getOAuthAccessToken(request_token, request_token_secret, oauth_verifier, wierd thing is oa.getOAuthRequestToken works with no issue but not oa.getOAuthAccessToken. how is this possible? after it fails at oa.getOAuthAccessToken, one thing to notice is that we get error router/index.js file in express. could it be that the callback url has issue with express? |
Is this still an issue for you ? |
I keep getting the error above on callback.
Any idea why?
The text was updated successfully, but these errors were encountered: