How to get the most recent posts on Yammer - api

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?

Could you use the autocomplete endpoint to search for the id of the hastag topic and then use the returned id to pull in this documented API?
https://developer.yammer.com/docs/messagesabout_topicidjson
https://www.yammer.com/api/v1/messages/about_topic/{{TOPIC_ID}}.json

Related

Is it possible to retrieve a list of all users that liked a tweet?

I started using Twitter's V2 API and the tweet/:id/liking_users endpoint returns only a recent 100 likings.
Is there a way to get a list of all users that liked a tweet?
No, the API only supports accessing the most recent 100 liking users.
Updated response 20th Jan 2022:
This has just been announced in the Twitter API v2.
Previously, you were limited to the 100 most recent Likes or Retweets with these endpoints. We heard your feedback that this was too limiting and have updated these endpoints to now return all results. To retrieve a complete list of Likes and Retweets, you can now use pagination.
Now, you can use the v2 Likes lookup endpoint: GET /2/tweets/:id/liking_users and get the full list (with pagination).

Instagram fetching tag recent user media after a max_id

Lets asume I fetch recent user media for a tag... And that I am able of storing in a database the information that it is returned to me by the API.
The media ids are something like [0-9]+_[0-9]+, and lets asume that one day later, I want to fetch only new data, so I order the media, that I stored in my DB, by instagram's created time, then I select the one that its the newest and grab its id something like '121231232213123_12312312312'.
Then I use that Id as the max_id attribute for the API endpoint https://api.instagram.com/v1/tags/{tag_name}/media/recent, I would assume, that I would get new user_media or an empty array if no one had upload anything.
The thing is that I receive all the same data, its like if it not filtering my results nor using the max_id.
is this correct behavior or should I do something else?
thanks,
ps: I posted this same issue also on google groups:
https://groups.google.com/forum/?fromgroups#!topic/instagram-api-developers/QyjCORkjr3I
I found 2 tips, that can be useful for you:
You should use min_id, in order to get new media. max_id will return photos, older that the one with this id.
It's better to use live API in order to update your DB with new photos dynamically.
UPDATE:
Instagram live API is deprecated now. However you can now use webhooks subscription system which is very similar to facebook. Details can be found in this answer.

Specify items per page

I'm trying to query Picasa Web Albums to pull album/photo data (obviously!) however initially I only need to pull the first 4 photos. Is there any way to limit a particular field or specify the items per page?
I've already accomplished something similar with Facebook's Graph API however I'm unable to find anything similar for Picasa. The only items I can find related to limiting the response is specifying which fields, but nothing related to the number of rows.
Use max-results argument. See doc here.
https://developers.google.com/picasa-web/docs/2.0/reference#Parameters

Get A Users Over All Retweet and Mention Counts using Twitter API

We are working on some analytics using the amount a user is retweeted or mentioned... I can't seem to find a way to get these numbers using the apis does anyone have any ideas?
https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name={screen_name}&count={count}
it's important to include the line include_entities=true to the request. This will give you an expanded response including re-tweet and mention counts.
Get Status / User Timeline
Twitter API Console
Update:
to get tweets from the last 90 days, there is a Node.js library you can use called Snapbird
https://github.com/remy/snapbird
.. and here is another resource covering the same topic.
http://blog.tweetsmarter.com/twitter-search/10-ways-and-20-features-for-searching-old-tweets/

Twitter Search API - Unusable?

After many tests, I've been unable to get the Twitter Search API to return more than 80% of tweets containing a specific keyword or hashtag. This is not related to the maximum number of results, one test involved a hashtag which had been tweeted 50 times and only 15 of them were returned by the Twitter Search API. The same results were returned when using Twitter's own search tool.
Is the Twitter Search API simply a tool for getting estimates and trends, rather than accurate data?
Has anyone found a way to capture 100% of tweets containing a specific keyword or hashtag?
Twitter filters search api for better results. Here is a quote from developer site:
Both the Streaming API and the Search
API filter, and on some end-points,
discard, statuses created by a small
proportion of accounts based upon
status quality metrics. For example,
frequent and repetitious status
updates may, in some instances, and in
combination with other metrics, result
in a different status quality score
for a given account.
Search api simply returns a subset of the found tweets.