PHP Create Instagram location Image Fetcher

In this post PHP create Instagram location Image Fetcher, i will be able to show you the way to create a simple Instagram location image fetcher in PHP by exploitation google map REST API and Instagram REST API. This application can use google map API to urge latitude and great circle|great circle} of a selected location then provide that latitude and longitude to Instagram API to fetch recent twenty public photos labeled thereupon location.

If you’re not accustomed to REST then REST stands for realistic State Transfer that could be a approach of accessing net services. quite seventy fifth of net services use REST. you’ll be able to access a REST service by employing a straightforward HTTP GET or POST requests. The API provide output most likely in JSON format and you’ll be able to rewrite it in PHP and use it in your application.

Now lets starts for PHP Create Instagram location Image Fetcher

There are two components during this application.

1) Fetch Latitude and line of longitude of a selected location exploitation google map API

you’ll be able to get each latitude and line of longitude of a location by a straightforward GET request within the following uniform resource locator. you’ll get JSON output.

https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA

Now lets checks its PHP codes for PHP Create Instagram location Image Fetcher

2) Get Latest pictures by exploitation Instagram API

The Instagram location API needed latitude and line of longitude and a ACCESS TOKEN . Here is that the REST API uniform resource locator. The output is additionally in JSON Format.

https://api.instagram.com/v1/locations/search?lat=48.858844&lng=2.294351&access_token=ADD-ACCESS-TOKEN

currently so as to get access token there square measure once more 2 ways

First technique for PHP Create Instagram location Image Fetcher

Register your app in Instagram developer console https://www.instagram.com/developer/ and obtain access token by exploitation once more exploitation GET Request like below

https://instagram.com/oauth/authorize/?client_id=56df9______b9cad&redirect_uri=http://localhost/test/instagram/&response_type=token&scope=basic+public_content+follower_list+comments+relationships+likes

however this access token may be wont to fetch your own data solely not the other users. Inorder to fetch public users data you would like to submit your app in instagram that could be a terribly complicated method therefore second technique

Second technique (Recommended and vary Easy) for PHP Create Instagram location Image Fetcher

simply visit following link to urge the Access Token. :: http://services.chrisriversdesign.com/instagram-token/

Once you get the access token then the PHP code for attractive pictures of that location is given below.

The Complete Code is given below for PHP Create Instagram location Image Fetcher

this is The Complete Code is given below for PHP Create Instagram location Image Fetcher, hear you have to pass latitude and longitude and you will get image of that location.

You also like google recaptcha using javascript and google recaptcha using php and PDO using Prepared Statements a Complete Reference