Thuzi / facebook-node-sdk

Modeled from the (Facebook Javascript SDK), now with the facebook-node-sdk you can now easily write the same code and share between your server (nodejs) and the client (Facebook Javascript SDK).
Other
737 stars 250 forks source link

Proxy Option not working #108

Open gilLionKing opened 9 years ago

gilLionKing commented 9 years ago

hi , i'm passing in the api options the proxy like that FB.options({ accessToken: 'toekn' , proxy: 'http://171.245.140.11:3128' }); im getting back an error _http_client.js:73 throw new TypeError('Request path contains unescaped characters.'); ^ TypeError: Request path contains unescaped characters. at new ClientRequest (_http_client.js:73:11) at TunnelingAgent.exports.request (http.js:49:10) at TunnelingAgent.createSocket (C:\Solutions\Main\Investigator\Indexer - Cop y\Indexer\node_modules\fb\node_modules\request\tunnel.js:116:25) at TunnelingAgent.createSecureSocket [as createSocket](C:SolutionsMainIn vestigatorIndexer - CopyIndexernode_modulesfbnode_modulesrequesttunnel.js :188:41) at TunnelingAgent.addRequest (C:\Solutions\Main\Investigator\Indexer - Copy\ Indexer\node_modules\fb\node_modules\request\tunnel.js:80:8)

u have any idea what could be the probem ? without the proxy option , it's working well

dantman commented 9 years ago

I don't know much about the proxy option.

My next beta release is going to have support for DEBUG=fb:req which we can also use to at least make sure it's not related to the url.

dantman commented 8 years ago

Could you try installing fb@^1.0.0-beta2 (or fb@next) and running your test again with the DEBUG=fb:req environment variable set.

The fb:req debug line outputted might give a hint to what is wrong. Alternatively it's also possible that the newer version of request may not have this bug.