diff --git a/openfb.js b/openfb.js index f4ead3a..08a5efe 100644 --- a/openfb.js +++ b/openfb.js @@ -157,11 +157,13 @@ var openFB = (function() { var method = obj.method || 'GET', params = obj.params || {}, xhr = new XMLHttpRequest(), - url; + url = 'https://graph.facebook.com'; params['access_token'] = tokenStore['fbtoken']; url = 'https://graph.facebook.com' + obj.path + '?' + toQueryString(params); + + if (obj.path.indexOf(url) >= 0 ) url = obj.path + '?' + toQueryString(params); xhr.onreadystatechange = function() { if (xhr.readyState === 4) { @@ -225,4 +227,4 @@ var openFB = (function() { oauthCallback: oauthCallback } -}()); \ No newline at end of file +}());