cannot get conversations of facebook page with API version 2.4

1.3k Views Asked by At

I'm trying to read conversations of my page but after creating a new "TestApp" on facebook I am not able to read the conversations of my page.

I used the Graph API Explorer for generating the Page Access Token but when I try to get the conversations of my page, the calls (graph.facebook.com/{my_page_id}/conversations) returns only the following fields: updated_time, link, id.

How can I retrieve the messages of any conversation_id returned by API? The API version used are 2.4.

1

There are 1 best solutions below

0
On BEST ANSWER

In v2.4 you need to declare the fields you want in the response.

To retrieve all fields from the conversations endpoint you need to execute the following:

https://graph.facebook.com/v2.4/{page-id}/conversations?fields=snippet,updated_time,message_count,unread_count, tags, participants,senders,can_reply,is_subscribed

References

  1. Declarative Fields https://developers.facebook.com/docs/apps/changelog#v2_4_changes

  2. Conversation Endpoint https://developers.facebook.com/docs/graph-api/reference/v2.4/conversation/