Click here to Skip to main content
15,888,088 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
I'm trying to use passport-facebook for authentication in my app. Whenever I try to login, I go through facebook account and authenticate but I come across with this error in callback :
 
InternalOAuthError: Failed to obtain access token
at Strategy.OAuth2Strategy._createOAuthError (d:\My Web App\retEdx\node_modules\passport-facebook\node_modules\passport-oauth2\lib\strategy.js:370:17)
at d:\My Web App\retEdx\node_modules\passport-facebook\node_modules\passport-oauth2\lib\strategy.js:166:45
at d:\My Web App\retEdx\node_modules\passport-facebook\node_modules\passport-oauth2\node_modules\oauth\lib\oauth2.js:177:18
at ClientRequest.<anonymous> (d:\My Web App\retEdx\node_modules\passport-facebook\node_modules\passport-oauth2\node_modules\oauth\lib\oauth2.js:148:5)
at ClientRequest.emit (events.js:107:17)
at TLSSocket.socketErrorListener (_http_client.js:271:9)
at TLSSocket.emit (events.js:129:20)
at net.js:459:14
at process._tickCallback (node.js:355:11)

C#
Now, I want to know this happens since I have to use proxy(freegate) for accessing to my facebook account (facebook is filtered in my country).
How can I resolve this issue?
I Hope to receive your kindly advice for solving this problem.


What I have tried:

I've downloaded lots of free sample in web like
https://github.com/passport/express-4.x-facebook-example
but I receive the same error.
I've created an appId in developers.facebook.com and used http://localhost:3000 as my web server.
My application goes to facebook for authentication and redirects to my application again, then show that error.
Posted
Updated 7-Aug-16 21:33pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900