Facebook Graph API - delete like

后端 未结 5 1779
广开言路
广开言路 2020-12-15 12:11

I\'m developing an app for Facebook in PHP, part of which lists the user\'s \"likes\". I would like to add a link next to each like so that the user can manage their likes b

5条回答
  •  渐次进展
    2020-12-15 12:21

    Likes do have an ID.

    If you look at https://graph.facebook.com/me/likes, you will see that the resulting data does contain an ID value for each.

    {
       "data": [
          {
             "name": "Audi",
             "category": "Consumer_products",
             "id": "96585976469",
             "created_time": "2010-09-27T15:30:15+0000"
          }
        ]
    }
    

    You might want to try the ID's there, I've noticed that the FB API doc sometimes has errors.

    Edit: I think this also may be a terminology issue, as what the doc says doesn't have ID's is probably likes to a user post, and these probably don't really have an ID and can be removed by issuing a delete to the POST_ID/likes. Then there's the likes generated by liking pages and/or external websites via the like-button, and these DO have an ID. Confusing, it is.

提交回复
热议问题