Question

I am currently testing the Area Tweet tutorial application (you can find the full source code by following the Creating the Area Tweet app link) on Firefox OS and I am encountering the following issue: the application does the call to the Twitter API, but does not receive a response, but the following WARN/ ERROR:

[JavaScript Warning: "CSP WARN:  
Directive script-src app://myapp1002.gaiamobile.org violated by 
http://search.twitter.com/search.json?callback=twitterCallback&q=test&_=1360318777176"]

What is the issue here? Is this a hint for not receveing a response to the API request or is there something else? I tested the application on both Firefox and Chrome browsers (on Windows) and it works fine.

I might also add that I tested the Firefox OS Boilerplate App and this one seems to work just fine. The only difference I see between these two web applications is that Area Tweet uses jQuery, while the boilerplate one does not. One modification that I did to the original source code of Area Tweet is that I load the jQuery libraries from localhost (to comply with the Mozilla packaging policy), but that does not seem to be the problem.

Was it helpful?

Solution

Add to your manifest.webapp request for network-http permission (this would allow your app to disable same origin policy) and use reqular json request to twitter (without callbackparameter).

OTHER TIPS

did you have any inline script in html file since you try to make a packaged app? packaged app don't allow inline script.

https://developer.mozilla.org/en-US/docs/Apps/Packaged_apps

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top