I'm trying to access the facebook api with parse cloud code using javascript. I want to do something very simple, return the events from a given locationId.
So I have this so far:
Parse.Cloud.define("hello", function(request, response) {
console.log("Logging this");
Parse.Cloud.httpRequest({
url: 'https://graph.facebook.com/v2.2/217733628398158/events' ,
success: function(httpResponse) {
console.log("Not logging this");
console.log(httpResponse.data);
},
error:function(httpResponse){
console.log("Not logging this");
console.error(httpResponse.data);
}
});
response.success("result");
});
When running this it seems that Parse.Cloud.httpRequest function is failling since is not reaching any log call.
Any idea?