Create a Foursquare Photo Uploader

Such an appointment say on previous post, let's now I will explain the steps to make the application


 Step 1 – Get an OAuth key from Foursquare
 Visit https://foursquare.com/oauth/register then login and fill out the form, if you are going to be using the tool from your local machine, enter http://localhost in the website and callback fields.
Once you register you will receive to long codes call Key and Secret, make a note of these.

Step 2 – Obtain the OAuth Token for your user
Next we need to ping a command to foursquare to get our OAuth Token which is required when uploading images and will upload the images at what ever user you are logged in as when you do the process.
So login to Foursquare as the user you want to upload photos as, then enter the following URL into your browser:-
Replacing KEY with the code we obtained in Step 1 and URL with the address you entered into the Callback field.
When you visit this address it will ask you if you want to allow access, hit the Allow button.
This will take you back to your address, however you will notice you have #access_token=TOKEN on the end of the URL the long code after the equals sign is your OAuth Token, make a note of this.

Step 3 – Create the HTML form
This part is quite simple, download script >>>here<<< and then create a HTML file in Notepad/Dreamweaver/TextWrangler or what ever your preferred HTML editor is then use this code in the body portion of the page:-

Be sure to replace the YOUR TOKEN HERE with the long code we obtained in Step 2.
Save the file to your local machine somewhere.

Step 4 – Using the HTML form
Open the HTML file we created in a browser.
Then in a new tab or window open Foursquare and search for your venue, once you have found the venue you want to add a photo to, the URL of the venue whoudl look something like this:-
http://foursquare.com/venue/128530
We want the number at the end, so copy or make a note of this.
Then switch tabs/windows to our form, enter the number into the first box, and select your photo using the browse button below, and hit Submit.
Note: The photo has to be a JPG with the content type image/jpeg otherwise it will fail.
You should then be taken to a page displaying a JSON response on it, if the start of the response looks like this:-
{"meta": {"code": 200.....
And it has a 200 in it then sucess, your photo has been uploaded. Go to the venue page and hit refresh and your photo should be there.
If you have gotten a number different to 200, you should be able to see an error message with a brief explanation of what was wrong.


 Warning: This is a very simple tool, which relies on you getting the venue ID correct, always check that you have added the photo to the correct venue and delete any misplaced ones.
with this application we can make the display interesting venue to be added
please try making your own, if you can find it difficult consultation with me here

dont forget to add my foursquare here
finally happy tweaking guys

credit:  stephenkeable

5 komentar:

de.roe said...

thanks alot nih share nya.. dicoba dulu ah..

Sam Jeef said...

mantraff...

JOEWANA said...

silahkan dicoba

Dani irva said...

bos nek posting nggae boso jowo ae.gk mudeng aq gan.asli jowo kan? :D

Harjifangki said...

Kalau keluar invalid Check in ID artinya kenapa ya?
Padahal nomor venuenya udah bener.

Post a Comment