I want to crawl all messages of every group on Yammer (including All Company Group)

筅森魡賤 提交于 2019-12-02 11:58:23

The best way to get this information is to use the Data Export API. This API is available to paid networks and outputs a ZIP file containing CSV files containing all messages, and list of users. You can pass a parameter called "since" to this API and it'll only provide data since a particular time. The users.csv file also includes a joined at date.

If you attempt to iterate over messages you will hit some limits. These limits are technical in nature and you would need to revert to the search API to find much older messages. Unfortunately you will have to put up with these limitations if you are dealing with the free version of Yammer as the data export is only available with the paid version.

I achieved this a different way. I used the export API to get a list of all of the groups.

https://export.yammer.com/api/v1/export?model=Group&access_token=

Then I looped through the list of groups and pulled all of the message data for each group and combined them into one *.json

https://www.yammer.com/api/v1/messages/in_group/###.json

Where ### is the group ID extracted from the groups export data.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!