Problem after login
Hi! I use Intel XDK to develop an hybrid app. When i build the apk, i have noticed that, after login (and getting token) every next request returns error, without specific problem message.
I had the same issue, after login all requests were coming back with 404. The solution for me was installing this cordova plugin: "cordova-plugin-whitelist"
Same problem happend in my end. Installing "cordova-plugin-whitelist" works perfectly. But there is more to do.
You also need to give permission for facebook.com in your whitelist for openfb.js to use the facebook graph api's XHR functionality.
<allow-navigation href="*://*.facebook.com/*" />
<allow-intent href="*://*.facebook.com/*" />
Add this lines to your intelxdk.config.additions.xml file. (Not in intelxdk.config.yourplatform.xml those files are generated automaticly.)
Also since you are getting the data, you might want to pass it to server side via XHR, then you should give permission with the same codes that we used for facebook.com domain.
Hope helps for those having the same issue. Gave me lost of headache.
Having this problem these days because of the CSP.
How to solve this on Phonegap for Android: 1- install cordova-plugin-whitelist just cordova grater than 4.0 2- Follow to "platforms/android/res/xml" and add the lines below in config.xml:
<allow-navigation href="*://*.facebook.com/*" />
<allow-intent href="*://*.facebook.com/*" />
In the doc (http://docs.phonegap.com/en/4.0.0/guide_appdev_whitelist_index.md.html) says:
Domain whitelisting is a security model that controls access to external domains over which you application has no control. Cordova's default security policy allows access to any site.
But, without the above lines dont works for me.