Переглянути джерело

possibly fixed
debug output left

Herbert Vojčík 13 роки тому
батько
коміт
ff0be4f1f5
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      lib-app/facebook-oauth.js

+ 2 - 1
lib-app/facebook-oauth.js

@@ -11,6 +11,7 @@ fb.OAuthInterface = function () {
 fb.OAuthInterface.prototype.restApi = function (method, args) {
 //  return wget("https://api.facebook.com/"+method+this.tokenString(), args);
   print("https://api.facebook.com/"+method+this.tokenString(), args);
+  print(wget("https://api.facebook.com/"+method+this.tokenString(), args, {complete:true}));
   response.stop();
 };
 
@@ -24,7 +25,7 @@ fb.OAuthInterface.prototype.graphApiPost = function (path, args) {
 
 fb.OAuthInterface.prototype.tokenString = function () {
   var token = this._token || (this._token = this.obtainToken());
-  return token ? "?access_token="+token : "";
+  return token ? "?access_token="+encodeURIComponent(token) : "";
 };
 
 fb.free = new fb.OAuthInterface;