I am trying to send a GET request to the Facebook API using fetch:
var url = "https://graph.facebook.com/v2.7/" +FACEBOOK_APP_ID +"?fields=context" +"{friends_using_app{id,name,picture.type(normal)}}" +"&access_token="+_this.props.user.facebook_access_token; fetch(url) .then((response) => response.json()) .then((responseJson) => { console.log(responseJson); }) .catch(function(error) { console.log(error); });
But I get TypeError: Network request failed(âĻ) in the JavaScript console. This only happens on iOS, it works great on Android.
As far as I know, iOS reacts natively to HTTPS requests by default, so no configuration is required for this.
I can make a https://google.com request using fetch , and I can view the result of the above request in safari when I print the url var and paste it directly.
It doesn't seem like you can find anything like that, but sorry if this is a duplicate.
source share