Automated Posting to Instagram

Got here from SNAP WordPress plugin?

SNAP for WordPress

Instagram API library is now included and integrated with the SNAP Pro for WordPress plugin. No separate installation is required.


NextScripts Instagram API library for PHP

Mobile Social image-sharing network Instagram is growing fast. Your site or blog is already posting your updates to Facebook and Twitter, so what about Instagram? Official Instagram API is not accepting images from anything other then mobile devices. New Automated Posting API library from NextScripts is capable of sharing images from your site directly to your Instagram account automatically.

Also get a WordPress Plugin that will automatically publish all your posts to Instagram.

Instagram Automated Posting Demo

Try it: Select Image to be sent to Instagram:

PN PN PN PN PN
Message: Send it to to our NextScripts Instagram Demo Account

Screenshots from WordPress Plugin

ig-settings

ig-post-settings

Get It

Instagram Automated Posting API Script is a part of the universal SNAP API. SNAP API provides a universal API interface for autoposting to more then 25 different social networks including Google+, Pinterest, Instagram, Flipboard, Reddit, YouTube, Blogger, and LinkedIn Company Pages as well as Facebook, Twitter, Tumblr, Flickr, Scoop.It and many others

Get it here: SNAP API

SNAP API

*** Special Offer: Get “SNAP Pro Plugin for WordPress” for free with any “SNAP API” Subscription.

Image Format

1. Extended.

Image is extended by the longer side to make it square. The whole image will be seen in the stream and in the full view. In the stream image will appear smaller.

IG-ImageStyle-Extended

2. Cropped.

Image is cropped to make it square. Some parts of the image will be permanently removed.

IG-ImageStyle-Cropped

3. Untouched.

Image is untouched. Instagram will crop image for the stream. Could cause “Uploaded image isn’t in an allowed aspect ratio” Error

IG-ImageStyle-Untouched

Usage


The script is very easy to use.

Examples:
1. Upload an image to your Instagram account:

<?php        
  require_once "nxs-api/nxs-api.php";
  require_once "nxs-api/nxs-http.php";
  require_once "inc/nxs-functions.php";  

  $login = 'YourInstagramUserName'; 
  $pass = 'YourInstagramPassword';
  $msg = 'Post this to Instagram! #testpost'; 
  $imgURL = 'http://www.YourWebsiteURL.com/link/to/your/image.jpg'; 
  $imgFormat = 'E'; // 'E' (Extended) or 'C' (Cropped) or 'U' (Untouched)

  $nt = new nxsAPI_IG();
  $loginError = $nt->connect($email, $pass);     
  if (!$loginError)
    {
      $result = $nt -> post($msg, $imgURL, $imgFormat);
    } 
  else echo $loginError; 
  
  if (!empty($result) && is_array($result) && !empty($result['post_url'])) 
    echo '<a target="_blank" href="'.$result['post_url'].'">New Post</a>'; 
  else 
    echo "<pre>".print_r($result, true)."</pre>";
?>

Requirements


PHP5, cURL with OpenSSL

Version history

Version 4.0.1.Beta 2 – March 21, 2016
   – Image formats are added

Version 4.0.0.Beta – March 4, 2016
   – Initial Release

© 2012-2016 NextScripts.com