I expect to be able to paginate over all pages (I can't even find information in the requests to attempt to paginate to another answer subset), from which I'll save the messages to Json for further processing. We are receiving notifications (webhooks) for Facebook ads so we are able to process them in real time. Now the tickets created for Facebook ad comments will be under the facebook channel. Check the box 'Enable Facebook posts, comments and ads comments'. Messages = graph.request(conversation_id + "?fields=messages&limit=100")Įxcept : Go to the 'Overview' page of your Facebook integration. #Function to help with the multiprocessingĭef get_conversation_from_id(conversation_id): Graph = facebook.GraphAPI(access_token=token, version = 3.1) So far, I've got this piece of code: import facebook While I can loop through some messages using facebook-api, there's this concept of paginating that I cannot find documentation about. I've checked other posts, such as Download Facebook Page Private Messages and How to download all Facebook 'posts to page' (without scrolling), but none of them allow to download ALL messages from the page.įacebook requests using the API only returns the results partially, therefore I need to move from page to page to find all messages. I want to download all chat messages in the Facebook Account that I manage to help building a chatbot.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |