foursquare api who's been there - foursquare

I which to display on my website a the list of maybe the last 5 peoples who checked in my venue.
I didn't find any method in the api to do that, the closest was showing your friend...
I tell my boss that it wasn't possible to do that then he shows me this site :
http://www.brooklynmuseum.org/community/foursquare/
How is it possible to get this kind of list and if possible with no authentication (my server will do the call no a real person so no oauth...)
thanks !

You can use the Venue Push API (documented here) to notify your website whenever a user checks in to your managed venue, which you can use to update such a list.

Related

Is there any way to get an artist's user id with the Spotify API?

One of the cool things about Spotify is the ability to view playlists created by both users and artists.
You can get a list of playlists for any user with:
https://api.spotify.com/v1/users/{user_id}/playlists
This will work if you plug in an artist's user id as well.
Example: https://api.spotify.com/v1/users/officialfoofighters/playlists returns playlists created by Foo Fighters (the actual band).
The problem is that I see no way to programmatically get an artist's user id. The actual artist id is different and will not work. I managed to manually get Foo Fighter's user id in a hacky way using the Spotify desktop client, but I would like to find a programmatic solution.
Anyone know of any workarounds?
I'm happy that you're asking for this, because it's a feature that we've been wanting to add to the Web API for a while. So even though the answer to this question is that it isn't possible to find an artist's username using the Web API (and the other way around) right now, I'd urge you to keep up to date on changes in the API through #SpotifyPlatform or our Change Log.

How to grab user track info through spotify api

I recently just got through the beginning tutorial for creating a web app with the spotify api. https://developer.spotify.com/web-api/tutorial/. The tutorial was great for showing how to authenticate a user with oauth and log in a user.
The problem I am having is with the endpoint. I can't seem to figure out how to change the endpoint so that instead of displaying a users profile, I can see a list of a users track, better yet starred or top 10 tracks.
for a 10,000 view perspective of what I want to build is a app that would allow users to easily log in through their spotify account, take their stared or top tracks and push them to a radio that I am building with an raspberry pi.
I am new to working with the spotify api and working with api's in general so whatever advice would be awesome.
At the moment, there is no way to get the "starred"-playlist. (At least it's not documented)
I don't know what you mean with "Top 10 User tracks", since this doesn't exist as far as I know
To get a list of the account's current playlists, change the URL to:
https://api.spotify.com/v1/users/{user_id}/playlists
With this URL, you will get a list of simple-playlist-objects wrapped inside a paging-object. Now you can select one of the playlists (or loop through them) and fetch its track this way
NOTE:
If you also want to fetch private playlists, make sure you use the scope playlist_read_private

How to grab instagram users based on a hashtag?

is there a way to grab instagram users based on a specific hashtag ?
I run contests based on re posting photos with specified hashtag then randomly pick a winner, i need a tool that can grab the usernames of those who reposted that photo and used that hashtag.
You can query instagram using the API. There are official clients for both python and ruby.
You didn't specify what language/platform you are using, so I'll give you the generic approach.
Query instagram using the Tag Recent Media endpoint.
In the response, you will receive a user object that has the user's username, id, profile url, and so on. This should be enough to do what you are describing.
As far as tools, there aren't great options to probably do things exactly how you want. If you just want a simple contest, you could use statigram, but it's not free.
If you roll your own solution, I highly recommend you also do the following:
Implement a rate limiting mechanism such as a task queue so you don't exceed your API calls (5000 per hour for most calls). Also useful for failures/network hicups, etc.
Have users authenticate so you can use OAuth to extend your API calls to 5000/per user/hour to get around #1.
Try the subscribe API if there won't be many items. You can subscribe to a specific tag as well, and you will get a change notification. At that point though you need to retrieve the actual media item(s), and this can cost a lot of API calls depending on how frequent and what volume these changes occur.
If your users don't have much photos/relatively small/known in advance, you can actually query the user's recent media instead and filter in your own code by hash tag.

find venue with twitter id via API

We integrate our service to 4sqr, this is done by our customer informing us of their venue-id from the 4sqr URL. However, if a venue is claimed and a twitter associated with the venue the url is switched to one with the twitter id.
so, one of two things after this twitter acct is in place for a venue:
1. how does one find the venue-id in your UI?
or
2. how does one query the venue details using the twitter handle?
thanks
Foursquare's /users/search should work (you're basically searching for a "venue user"). https://developer.foursquare.com/docs/explore#req=users/search%3Ftwitter%3Dwinkellyauto

Foursquare Checkin in delivery restaurants

I have an app where you can buy food on delivery restaurants.
Can I use the Foursquare API so the user can check-in on the restaurant that he order from?
Probably the user will not be in the resutaurant it self when he checkin.
There is an special way to do this on the foursquare api?
thanks
You can check-in any user that has authorized your application at a venue using the /checkins/add endpoint in the API. If you don't know the user's actual location (or fully expect them not to actually be there, but have a legitimate reason to be checking in, e.g. for delivery) be sure to leave the lat/lng parameter blank. The check-in will go through and be in the user's history, but won't count for badges/mayorships, etc.
I'm not too sure what you're asking. I don't think you can check in to places if you're not even near them (or at least I wasn't able to when I last used the 4sq API).
Check this tutorial out if you need help getting started with the API, or read the 4sq api documentation.

Resources