Few can argue that Instagram is one of the most powerful and engaging social media platforms across the internet right now. It has more than 700 million monthly active users and about 400 million active users per day. No surprise that many merchants and companies are already using Instagram as their primary sale or promotion channel.
Taking into the account that 65% of customers are engaged in online shopping and social media, integrating Instagram may actually provide you a huge boost in sales and conversions. We’d like to share two most popular Instagram website integrations: social login and feed streaming and teach you how to integrate API into a website.
Login with Instagram Using PHP
It must be acknowledged that the shorter registration form – the higher conversion rates. Users are not willing to spend hours filling in long forms. The feature we’re going to integrate will allow your users to quickly login by using only their Instagram account password.
Moreover, making this function available you still will be able to collect all valuable user data required for targeting, email newsletters, and analytical purposes.
Information that can be obtained through Instagram API:
Delete like media
Get location media
Step #1 Registering your Application
Login on www.instagram.com;
Go to the developer account https://www.instagram.com/developer/;
Click on “Register Your Application” button;
Register new client ID;
In “Website URL” field use your website address or localhost if you’re using it;
In “Redirect URL” field type location where the response will be handled (e.g. http://yourwebsite/yourprojectfolder/callback.php );
Go to Manage Clients tab. From here you can acquire your Client ID and Client Secret.
Step #2 User Flow
The principle of Instagram authentication is quite simple. User clicks on “Login with Instagram” button. The request is redirected through Authorization URL to Instagram.
For the “name” field use your username as it shown in Instagram’s address line.
The string $instagram_feed_data = json_decode($json, true); indicate the data will be contained and decoded. The data will be decoded into the array.
Basically, in your array, the data about each post will be structured into [“items”]. Each item contains the information about every single post including user info, images, the caption, likes, comments, etc.
This is the information we’ll gonna use. But first, you should check if there are any items in the array. Here’s how to make this:
foreach ($instagram_feed_data['items'] as $item) }
Next, you’ll need to get an actual post link and image URL. Keep in mind that the array contains image URLs in multiple formats: thumbnail, low_resolution, and standard_resolution. You may choose one of those formats depending on your needs.
Now, when feed data is acquired we can stream to your webpage. Let’s start with the images by using image URLs. Since this URL is leading to an external web resource (Instagram), we’ll make target blank. Then, list an output of actual image and caption.
Tony Sol is the business development manager of GBKSOFT, overseeing the production of all writings for both internal blog and external platforms. He is technical-driven person always looking for new benefits of merging business and software.
It has been awhile over a year since PHP 7 was released. The advanced version that is meant to replace PHP 5 and PHP 6 (failed one) version. And, well… if you’re going into development and making final research before signing a contract, this question might bother you. So, if you just wondering around and...
New mobile project joins our portfolio! Check out Sparkle, location-based social instant chat. Sparkle is an app where users can find public chats nearby or at their exact location and join them. Killing time on the internet turned into the possibility to meet new people and turn neighbors into friends.
Here’s a short back-end developer definition to kickstart this topic. A back-end developer is a programmer who defines core computational logic of your application or website. This type of specialists is responsible for the creation of inner functions and features of the app which then are accessed by a user through a front-end interface. ...