I try to get Events in Facebook with GraphRequest
and GraphRequestManager
, but my result is an [Error: type NSDictionary cannot be converted to NSString]
Here is my code:
var search = JSON.parse('{ "q":"Coffee", "type": "event"}');
new GraphRequestManager().addRequest(new GraphRequest(
search,
null,
function(error: ?Object, result: ?Object) {
if (error) {
console.log('Error fetching data: ' , error);
} else {
console.log('Success fetching ddata: ' , result);
}
},
)).start()
Ah. I sovled this. It's wrong parameter. I found the constructor in
node-modules/react-native-fbsdk/js/FBGraphRequest.js