Instagram script that works for me as of 2016.11.28

Forums NextScripts API Forums – Google+, Pinterest, LinkedIn, etc.. Instagram script that works for me as of 2016.11.28

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #522426
    Iain Lea
    Participant

      I opened a ticket concerning an error ( PHP Fatal error: Call to undefined function nxs_mkRemOptsArr() ) using a simple example script provided on NextScripts website to post to Instagram after purchasing API Light on 10th November.

      I have still not received an answer to my OPENED TICKET #306591 after 2 weeks! that is BAD SUPPORT!
      and something I will certainly have to take into account if I decide to develop an Enterprize App in 2017…

      Anyway after much searching around on this forum here is a fixed script that works for me and Instagram.

      –cut-here–

      <?php
      require_once “inc/nxs-networks-class.php”;
      require_once “nxs-snap-class.php”;
      require_once “nxs-api/nxs-api.php”;

      $user = ‘YOUR-IG-USERNAME’;
      $pass = ‘YOUR-IG-PASSWORD’;
      $msg = ‘Message Text #tag1 #tag2 #tagN’;
      $imgURL = ‘file:///tmp/image.jpg’;
      // $imgURL = ‘https://www.YOUR-DOMAIN.com/tmp/image.jpg&#8217;;
      $imgFormat = ‘U’; // ‘E’ (Extended) or ‘C’ (Cropped) or ‘U’ (Untouched)

      date_default_timezone_set(“Europe/Berlin”);

      $nt = new nxsAPI_IG();
      $loginError = $nt->connect($user, $pass);
      if (!$loginError)
      {
      $result = $nt -> post($msg, $imgURL, $imgFormat);
      }
      else echo $loginError;

      if (!empty($result) && is_array($result) && !empty($result[‘post_url’]))
      echo ‘New Post‘;
      else
      echo “

      ".print_r($result, true)."

      “;
      ?>

    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.