Endpoint for getting friends who have been to a venue - foursquare

The website has had for some time now a section that shows friends who have been to a certain venue, yet I do not see an endpoint for getting this information.
Is such an endpoint in the works or is this considered a privacy issue like friends history even though they're both on the website???

There is no API endpoint with this functionality yet. There's a variety of reasons for why this is the case, but the primary one is that it hasn't hit the top of our priority stack just yet (this element of the website was not built off of the API)

Related

Instagram search user api always return empty result with success code

We are invoking instagram search users api to get profile list as
https://api.instagram.com/v1/users/search?q={search-term}&access_token={access-token}
but we are getting always empty result with success code as
{"meta": {"code": 200}, "data": []}
Our search term would be always instagram username i.e. username portion from https://www.instagram.com/username/
I remember this was working before 2-3 months. Any other are facing similar issue?
Sounds like you already figured out your problem. In case anyone else is having the same problem, here's a short article summarizing how Instagram's Sandbox Mode works.
TL;DR
“Sandbox mode” is the (unintuitively-named) gatekeeper walling off
most of what you want to do. This is the default status for all
clients, that have not undergone the strict submission process. An API
client in sandbox mode has extremely limited permissions. In fact, it
has fewer permissions than an anonymous user viewing public content
because your app basically lives on a tiny desert island in which you
are the only Instagram user and only your past twenty posts exist. So,
for example, the /media/search endpoint will only return the media you
uploaded near a given location, excluding the media from everyone else
or any posts beyond your last twenty.
So your API call is succeeding. It just isn't finding any results because it can only "see" other sanbox users for your client.

cannot access followers on instagram sandbox

I'm trying to test my Instagram app in sandbox, I'm trying to get some stats and alerts on new/lost followers ... but is not possible because of sandbox limitations; followers to the authAccount are hidden. I understand I cannot access accounts out of sandbox as main accounts, but I should be able to check ALL followers and followings.
Please Instagram team fix this!
I want to test pagination, but this is impossible because of sandbox limits.
As it is set now,
https://api.instagram.com/v1/users/self/follows?access_token=XXX&count=100
returns just an empty result
It's not broken, this is by design.
You need two things:
Include follower_list as one of the scopes when you authenticate
Add some users to your Client's Sandbox
Once you have the appropriate scope and a few users in your client's sandbox you can have the sandbox users follow each other. Queries generated by a sandboxed client will return only users that you manually added to the sandbox.
It's kind of confusing but that's what got me going.
Probably it because of sandbox limitation, recently faced smth similar http://progrnotes.blogspot.co.uk/2015/11/instagram-api-search-by-tag-doesnt.html.
I think you need to have test users in folowers, and you will be able to see them via api
It's due to the fact that you're in Sandbox mode. I can't see it either. You'll need to apply for the permissions starting December 3 to gain access to the followers list scope.
I think there actually is an issue. Even with correctly configured OAuth permissions in sandboxed mode!
Today, there are several endpoints that deals with followers.
self/follows
Example:
https://api.instagram.com/v1/users/self/follows?access_token=ACCESS-TOKEN
self/followed-by
https://api.instagram.com/v1/users/self/followed-by?access_token=ACCESS-TOKEN
Now, obviously the API uses the access-token to get the proper information. So, the only list it can return here is the list of users that the current authenticated user follows or is followed by.
In the previous API, there was an API endpoint that looked like this
/users/[user-id]/follows?access_token=ACCESS_TOKEN
This endpoint is still valid but works exactly the same as self/follows and self/following, that is, only useful for the current authenticated user. That is, in-sandboxed-mode! Will post if I can get passed the find folks at the Instagram review board. (This is I guess the only way to properly test this.) However, there are no documentation of this use of the API so it may very well not work.
This leaves us with the following API endpoints:
{user-id}/relationship
Example
v1/users/{user-id}/relationship?access_token=ACCESS-TOKEN
Again, this will obviously only return the status of the relationship between the currently authenticated user and the user with the user-id supplied in the url.

Like a page via foursquare API

Can't find an endpoint providing "Like a page" (not a page update) via the API. Any suggestions? Looking here https://developer.foursquare.com/docs/pages/pages
You won't find such an endpoint: "like a page" is explicitly intended to be done by users, never via an API. None of the major platforms that allow things like Likes provide API endpoints for that action (Facebook doesn't, Foursquare doesn't either) because they do not want developers gaming the system and inadvertently (or on purpose) performing those actions without user consent.
So no: you're probably never going to find an API endpoint for that.
Documentation for this endpoint is coming soon (we're in the process of auditing our API to document the new APIs introduced by #allnew4sq)
The endpoint is /pages/USER_ID/like and without any additional params probably does what you want it to do.

When checking in via foursquare API, I do NOT show up in Here Now

Not sure if this is related to this question (seems to be but I cannot comment only answer and I don't have one yet but would like to add my experience with this issue).
There are 3 foursquare apps I use on my Windows Phone. The official app, 4th & Mayor, and my own app. I've also experienced this via foursquare.com/mobile checkins.
Using the official app and my app, when I checkin to a venue, I do not show up in "Here Now" whether from phone apps or on the website or looking at the json from the API calls. When checking my "last seen at" it shows me there.
Using 4th & Mayor it's hit or miss. Sometimes I'll show up in "Here Now" (within all apps and the website) and sometimes I don't.
One thing to note, when it finally does show me in "Here Now" at a venue, if I checkin to another venue and I do NOT show up in "Here Now", "Here Now" for the old venue still shows me there, so it's not clearing that out. "Last seen at" shows me in the new venue.
I'm not checking in off the grid and I do have the "Include me in the public list of people who are currently checked in at a venue" checked. Even tried unchecking it and checking it back. I've tried with 2 different accounts and I've tried with and without shouts, with and without sharing to facebook and twitter, and the normal and quick checkin options. All with the same results.
NOTE that I'm not just relying on the apps showing me that I'm at a venue, I'm looking at the raw json returned from the API, both from my app and the API Explorer # developer.foursquare.com.
If it helps, here's the HTTP Post from my app (venue and oauth token removed):
https://api.foursquare.com/v2/checkins/add?broadcast=public,facebook&venueId=the_venue_id&oauth_token=my_token&v=20111030
I've even tried changing the version to &v=20120107 and it still doesn't work.
I've also logged out everwhere I could think of and even disconnected my facebook and twitter accounts.
It is only recently this has started, within the past couple days.
So, in summary,
When I checkin I do not show up in Here Now, either from the venues/VENUE_ID endpoint, the venues/search endpoint (I'm not counted in the here now), or the venues/VENUE_ID/herenow endpoint.
My checkin does show up via users/self and via the checkins/recent endpoint.
Apps used: foursquare for Windows Phone, 4th & Mayor, my own Windows Phone app, and foursquare.com/mobile.
You may not appear in herenow for a variety of reasons:
1) If a user checks in without a lat/lng, we consider that a record-keeping check-in and may not display the user in herenow since we have no idea if they are actually there or not
2) If the user checks in with a lat/lng that is sufficiently far away from the venue, we may not display the user in herenow.
Looking at your request, it would appear that you're not passing your current lat/lng to the API, which would likely put you in case (1).
The official app + 4th & Mayor should be passing your lat/lng as reported by your phone. The only reason I can think that herenow wouldn't update is if you're checking in to a venue you are not near to, or if your phone has a poor GPS look.
If you do start passing lat/lngs to the API servers, be sure that you are reporting the user's actual location as reported by an impartial device (like the phone's OS). Failure to do otherwise may cause your application to be disabled without notice.

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