How to get the most recent posts on Yammer

%3CLINGO-SUB%20id%3D%22lingo-sub-12304%22%20slang%3D%22en-US%22%3EHow%20to%20get%20the%20most%20recent%20posts%20on%20Yammer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-12304%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20trying%20to%20query%20the%20Yammer%20API%20in%20order%20to%20do%20a%20search%20for%20all%20the%20posts%20with%20a%20certain%20hashtag%20eg.%20%23win%20and%20then%20return%20the%20latest%2020%20posts.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20problem%20is%2C%20the%20%22%3CA%20href%3D%22https%3A%2F%2Fapi.yammer.com%2Fapi%2Fv1%2Fsearch.json%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fapi.yammer.com%2Fapi%2Fv1%2Fsearch.json%3C%2FA%3E%22%20endpoint%20returns%20your%20searches%20however%2C%20they're%20in%20seemingly%20random%20order%20and%20is%20not%20the%20latest.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYammer%20limits%20you%20to%20only%2020%20results%20each%20time%20you%20call%20the%20API%2C%20and%20there%20may%20potentially%20be%20thousands%20of%20posts%2C%20so%20I%20cannot%20pull%20them%20all%20down%20and%20find%20the%2020%20most%20recent%20ones%20myself.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnyone%20have%20any%20ideas%20on%20how%20to%20get%20the%20latest%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-12304%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAPI%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EREST%20API%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EYammer%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

I'm trying to query the Yammer API in order to do a search for all the posts with a certain hashtag eg. #win and then return the latest 20 posts.

 

The problem is, the "https://api.yammer.com/api/v1/search.json" endpoint returns your searches however, they're in seemingly random order and is not the latest.

 

Yammer limits you to only 20 results each time you call the API, and there may potentially be thousands of posts, so I cannot pull them all down and find the 20 most recent ones myself.

 

Anyone have any ideas on how to get the latest?

0 Replies