Posts automaticas instagram php

Asked

Viewed 332 times

-3

I’m having trouble developing a php script to make automatic publications on Instagram, the same has a API for these publications, with support for CRUD, but for that, it is necessary that I be part of the closed beta Facebook Marketing Partners or Instagram Partners, that in case I did not get permission as they are not accepting new partners...

I would like to know if anyone has any solution, or has obtained these permissions in any way!

Thank you in advance.

1 answer

0


You can use this API: https://github.com/mgp25/Instagram-API

Here’s an example of how to upload a photo to Instagram:

<?php
require '../src/Instagram.php';
/////// CONFIG ///////
$username = '';
$password = '';
$debug    = false;
$photo    = '';     // path to the photo
$caption  = null;   // caption
//////////////////////
$i = new Instagram($username, $password, $debug);
try{
  $i->login();
} catch (InstagramException $e)
{
  $e->getMessage();
  exit();
}
try {
  $i->uploadPhoto($photo, $caption);
} catch (Exception $e)
{
  echo $e->getMessage();
}
  • Thank you very much for the friendly reply!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.