问题
We are trying to crawl all messages of every group on Yammer (including All Company Group) using https://www.yammer.com/api/v1/messages.json?group_id=<>&access_token=<>,nut its giving me duplicates and also i am not getting complete messages. Is there any way to do this?
Is there any way to get new users joined on Yammer after specific date?
Any sort of help is appreciated.
回答1:
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.
回答2:
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.
来源:https://stackoverflow.com/questions/17805362/i-want-to-crawl-all-messages-of-every-group-on-yammer-including-all-company-gro