How to delete Facebook post that is not posted by your application?
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{post-id}",
null,
HttpMethod.DELETE,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
} ).executeAsync();
Above code is not working.
It is giving error:-
{
"error": {
"message": "(#200) This post wasn't created by the application",
"type": "OAuthException",
"code": 200,
}
}
According to the Graph API reference:
An app can delete any post it published, or a page-management app can delete a Post published to a Page that the app manages.
So it depends on what you are doing.