If users link their foursquare account to my site, via oauth2, when I pull a venue from the foursquare API would I be able to test if the current user is the same user who verified the venue (assuming the venue is verified)?
Or... is it possible to use the foursquare API to know who verified a venue?
I'm trying to build a service which venue owners/managers can use to help their business. However, I'll need a way to verify they are the owners/managers of the venue. I believe a very effective way to do this would be to force them to link their foursquare account, and then test if their account was the one that verified the venue.
If that's not possible, what's the standard way this is performed?
Instead of testing if a venue is managed by the current OAuth'd user, would it make more sense to get all of the venues that the current user manages? You can do that through our venues/managed endpoint.
Also in general, your approach of requiring the user to OAuth is correct and pretty standard for these style of apps. Our info on our merchant platform should be able to help you out.
Related
So I'm making an app where I use foursquare API to get closest venues. I'm also thinking about using the features that require the user to authenticate, like check in endpoint. But as I have explored the foursquare authentication, it seems like that my users would have to create foursquare account to use my app.
My problem with this is that it feels like I'm giving too big part of my app (all the user details) to foursquare's side. Like if I want to create features in my app that don't require foursquare account, isn't the linkage to foursquare's stuff restricting my ability to grow my app (as my users are basically all foursquare's users.)
So is there a way to create my own user database while using the foursquare's features? Or is this even a thing to take into account? Will it cause me problems in the future?
The checkin endpoint requires user authentication because a user is checking into a venue. This is key feature of foursquare. The user has to be a foursquare user because there'd be no other way for foursquare to track them and stats, and comments, etc.
I think what you want to do is create your own app that allows someone to do things similar to Swarm or some of the venue features in Foursquare. You need to create your own database of user information and track everything yourself. If a person wants to use any of foursquare features they need to be a foursquare user. Anything your app keeps track of wont be a part of the foursquare network. One could not checkin with your app and have it show up in foursquare, if you keep things separate.
If you decide to mix and match just remember there are time limits on data caching that foursquare would like you to adhere to.
As for future problems, read the Terms Of Service for the API carefully, and if your app seems like a clone of either Swarm or FourSquare, and you're not using their users, they might ask you to cease and desist
We would like to develop a survey in which consenting participants would have to give us access to their list of checkins on Foursquare. Currently, we do so via a Foursquare app, but I do not seem to find a way to specify which permissions our application needs.
Whenever a user is asked to grant access to our app, he is informed that we will be able to post checkins on his behalf and do a bunch of other things. This will raise concerns and will likely lower the number of willing participants.
The question would be whether there is a way to restrict the permissions of our app to what we actually need, i.e. the full list of checkins.
As an alternative, we are considering befriending the user from a special account instead. However, does friendship guarantee that we can see all of his checkins?
The Foursquare API currently doesn't support scoped permissions (e.g., seeing check-ins only). You will have to make it clear to your users that you won't post to their accounts.
The only way to see a person's entire history of check-ins is if you have an access token for them, so unfortunately the befriending method won't work.
I am trying to use the Ebay API to get completed transactions for a seller(s) that is using a different account from my developer account. I've looked into GetSellerTransactions and GetOrders. Unfortunately, I am not sure if it's possible to specify a User ID different from mine. Could you point me to working example of how to do this?
To get transactions for a user you should be first authorized by that user.
You will need a developer account for that.
This links will guide you
http://developer.ebay.com/DevZone/XML/docs/WebHelp/wwhelp/wwhimpl/common/html/wwhelp.htm?context=eBay_XML_API&file=GettingTokens-Getting_Tokens_for_Applications_with_Multiple_Users.html
http://developer.ebay.com/DevZone/XML/docs/WebHelp/wwhelp/wwhimpl/common/html/wwhelp.htm?context=eBay_XML_API&file=DevAndTestApplications-Testing_Applications.html
Once you get the user token for a user you need to send them along with your developer credentials to make the getOrders API call for that particular user.
on the documentation page, https://developer.foursquare.com/overview/venues, it says that
The Venues Platform lets developers use foursquare as their location
layer. Applications can search our database and find information
including tips, photos, check-in counts, and here now. Searches can be
done near a point or through a whole city, and they can be restricted
to trending or recommended places. The platform offers all of this
without requiring end user authentication and is available at high
rate limits.
however, when i send request like:
https://api.foursquare.com/v2/venues/4ad7a112f964a520050d21e3/herenow?client_id=myclientid&client_secret=myclientsecret&v=20120119
i got this:
{"meta":{"code":200},"response":{"hereNow":{"count":16,"items":[]}}}
is there anything i need to do, such as register as a venue platform developer, to get the list of people who are here? thanks!
You cannot get the users information without authenticating [ :( ]
Check out the documentation at the herenow endpoint page.
Specifically the first line:
Provides a count of how many people are at a given venue. If the request is user authenticated, also returns a list of the users there, friends-first.
The FourSquare API seems to be very user-centric: After logging in via OAuth I can see my friends check in, and which of my friends are currently checked into a given venue.
I'm looking for something more venue-centric, where I can get a list of everybody currently checked into a venue (friends and non-friends), or ideally receive a notification each time there is a new check-in at a specific venue. Is this possible with the existing V2 API?
I know you asked this 2 months ago and surely found an answer already but to answer your question directly.
where I can get a list of everybody currently checked into a venue
(friends and non-friends)
The FourSquare version 2 API has a venues endpoint
https://foursquare.com/dev/merchant/index_docs.html
A sample call will give you a stats field in the response
https://api.foursquare.com/v2/venues/5104
Stats:
Contains checkinsCount (total checkins ever here) and usersCount (total users who have ever checked in here).
for more venue information, FourSuare has a subset to the version 2 API called the venues project with more venue driven data you can update and mine through.
https://developer.foursquare.com/venues/index
You can check the venue checkins and mayors, comments, etc. Easily with the foursquare API, just check the API documentation for which calls can you make.
I wrote a handy article about how to connect to the foursquare api and make calls to it through PHP, you can find it here http://ryokuweil.wordpress.com/2011/08/29/how-to-use-the-foursquare-api-v2-with-oauth-and-php/
Authenticated calls /venues/herenow will return a list of people currently checked in. See https://developer.foursquare.com/docs/venues/herenow.html
To receive notifications when new users check-in to a venue, you need to have your application authorized by a manager of the foursquare venue, then enable your app (on foursquare.com/oauth) for the foursquare Venue Push API