0

I am trying to delete a cover photo of a page via open graph.

Is this even possible?

The cover was set with:

https://graph.facebook.com/PAGE_ID?cover=IMAGE_ID&method=POST&access_token=ACCESS_TOKEN&no_feed_story=true

And deleted with:

https://graph.facebook.com/IMAGE_ID?method=DELETE&access_token=ACCESS_TOKEN

You dont have the permission to do so:

{
  "error": {
    "message": "(#200) Permissions error", 
    "type": "OAuthException", 
    "code": 200
  }
}

When I set the cover, Facebook saves a new photo into the cover-album of the page. This cover photo is not created by the app.

So it looks like I am unable to delete the cover photos of a page. Because you can only delete photos that were created by the same app.

Can someone verify this?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • 1
    https://developers.facebook.com/docs/reference/api/page/ has a section titled “Setting a Cover Photo”. If deleting it via API was possible, I assume it would also be mentioned right there. Since it isn’t – I’d say, not possible. – CBroe Sep 24 '12 at 14:35

2 Answers2

0

There is no API which provides that functionality - if you found documentation suggesting otherwise please comment here and i'll get it corrected

Igy
  • 43,710
  • 8
  • 89
  • 115
0

I actually got it working, but it more seems a bug on FB side than anything else.

I did the same as initial post, and I would say I managed to have cover deleted in about 20% of my tests (sometimes by entering url directly in my browser, sometimes using PHP/CURL)

But in ALL my recent tests, it's NOT WORKING anymore.

Got "#200 Permissions Error" message when it's not working, and simply "true" when it does.

Seems that has difficulties handling page access token permissions.

Too bad, since I wanted to display my office's webcam capture as my FB cover, but I need to delete my old covers from time to time automatically to avoid my Covers folder to be filled with screen caps every minute or so, and only keep the 10 latest.