Open lichutin opened 9 years ago
I also need to call graph API with another method (delete). i'm working on implanting a method choice with graph requests; I'll let you know when i'm done with it
+1
+2
+3
I managed to make a request that uses "delete" method in a request to graph api : simply use a classic jquery ajax request :smile: This request deletes the app from the facebook user. Doing this, the user will see "Do you want to give this informations to this app..." next time he tries to connect
$.ajax({
method : 'DELETE', url : "https://graph.facebook.com/" + userID+ "/permissions"
+ "?access_token=" + userAccessToken });
I guess it looks pretty the same for a POST query
I had to clone and add my own functionality. I actually cloned a fork of this repo but here's my code. You can then use FacebookConnectPlugin.apiPost(path, permissions, postData, success, failure)
instead of FacebookConnectPlugin.api(path, permissions, success, failure)
to POST
https://github.com/dantabel/cordova-plugin-facebook4
Can you post a file object? for a video upload?
@jnccneto I haven't tried it but I think so. See Facebook docs for the params and path etc, but I think it just uses a POST, you just need to make sure that the video is encoded as multipart/form-data as stated in the FB docs: https://developers.facebook.com/docs/graph-api/reference/user/videos/#Creating
Yes that's the way. I endedp using a FileTransfer() from cordova plugin cordova-plugin-file-transfer
Hello! It's very intresting to know how to send post-api calls via this plugin. Is there some solution?