Create your own web-based foursquare photo uploader
It wasn’t long after foursquare released photo support last month that users started asking how they could upload photos from the web. The short answer is that you can only upload them using the iPhone or Android app. That’s not a very convenient solution if you’re looking to upload photos that are stored on your desktop computer or if you don’t have an iPhone or Android device.
Using version 2 of foursquare’s open API, Stephen Keable has put together a tutorial for building a foursquare photo uploader on your own website. It’s not pretty, but it gets the job done until someone comes along and builds an application that makes it easier. I encourage you to read his tutorial for the full details, but here are the basics:
- Get an OAuth key from foursquare at https://foursquare.com/oauth/register
- Use that key to obtain an OAuth token for yourself by visiting:
https://foursquare.com/oauth2/authenticate?client_id=KEY&response_type=token&redirect_uri=URL
- Build a page with this simple HTML form:
<form action="https://api.foursquare.com/v2/photos/add" method="post" enctype="multipart/form-data"> <p>Venue ID: <input type="text" name="venueId"></p> <p><input type="file" name="photo"></p> <input type="hidden" name="oauth_token" value="YOUR TOKEN HERE"> <input type="submit"> </form>
- Enter the venue ID, select the photo and upload.
I’ll add that this also works very well for adding a photo to a tip you’ve previously added (like this). Simply replace the “venueId” field with “tipId” and enter the tip’s ID in the field. You can find it by clicking the date link under the tip and copying the long string at the end of the URL.
Like I said, this isn’t pretty, but it does work very well. I’ve used it to upload several photos with no problems at all.
No related posts.

It doesn’t work for me.
Can anybody help me with it.
Error:
{“metaâ€:{“codeâ€:405,â€errorTypeâ€:â€otherâ€,â€errorDetailâ€:â€This endpoint only supports POST.â€},â€responseâ€:{}}
Did you copy the code from here or Stephen’s site? I think he has an extra “>” after “photos/add” that could be throwing it off.
Thanks for mentioning my tutorial.
Like your little mod about adding a photo to a tip
I updated the code on my site now, I think WordPress put an extra > in the code when I pasted it.
Also possible for check in… change this in the second line: name=â€checkinIdâ€
got this response:
{“meta”:{“code”:400,”errorType”:”param_error”,”errorDetail”:”Must provide a valid photo ID”},”response”:{}}
Can anybody help me with it?
[...] want them to be ones just from your mobile phone), About Foursquare describes a nice way to upload photos from your desktop (a little programming knowledge is [...]
[...] want them to be ones just from your mobile phone), About Foursquare describes a nice way to upload photos from your desktop (a little programming knowledge is [...]