Graph API Search with React-native

247 Views Asked by At

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()
Anyone helps me? Thank you very much!

1

There are 1 best solutions below

1
On

Ah. I sovled this. It's wrong parameter. I found the constructor in node-modules/react-native-fbsdk/js/FBGraphRequest.js