facebookrestapifacebook-graph-apifacebook-workplace

Using pagination is there a way to get facebook messages via graph api v6.0?


Is there a way to get facebook messages via graph api v6.0? I am not able to use "since", "until" pagination on "conversations" endpoint.

    https://graph.facebook.com/[USER_ID]/conversations?since=<unix_timestamp>&access_token=[ACCESS_TOKEN]&debug=all

I am not able to use "thread_id" end point since its deprecated in newer version of graph api.


Solution

  • About since and until, it seems like not all endpoints of Facebook Graph API can be used with time-based pagination. And the documentation (https://developers.facebook.com/docs/graph-api/reference/v6.0/conversation) says that:

    The Conversations edge is not a Time-Based edge.

    The idea is to use cursor-based pagination, and it works for conversations, the idea of this kind of pagination described here: https://developers.facebook.com/docs/graph-api/using-graph-api/