Languages

Menu
Sites
Language
oauth issues

Hi 

I followed this tutorial in a webapp in tizen :

http://www.sitepoint.com/building-twitter-app-using-angularjs/

and i successfully ran the application, but after oauth was initialized, 

i got this error : 

Cannot find hostname in file:/// from static 
code: InvalidHeader 
message: Cannot find hostname in file:/// from static 

 

Google is telling me that i should replace my oauth.js by the phonegap's one

But how could i do that with tizen as it"s not a phonegap application ?

 

Thanks 

 

Edited by: joachim Rodrigues on 04 Jan, 2016

Responses

1 Replies
joachim Rodrigues

it seems that the problem is in : 

connectTwitter: function() {
            var deferred = $q.defer();
            OAuth.popup('twitter', {cache:false}, function(error, result) { //cache means to execute the callback if the tokens are already present
                if (!error) {
                    authorizationResult = result;
                    deferred.resolve();
                } else {
                    //do something if there's an error
                	console.log(error);
                }
            });
            return deferred.promise;
        },

i'm getting in the console : 

Error: Could not open a popup

I then set the alow popup in the navigator, but still the issue 

any idea ?