Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uploading photos to instagram, using a script

Is it possible to upload photos from a webpage to Instagram, if so how do you do it?

I am wondering how to do this, so I can have a website where people can vote on their favourite photo and the one with most votes will be posted each day!

like image 658
reidjako Avatar asked May 25 '14 08:05

reidjako


People also ask

Can you automate Instagram posts with Python?

You can now schedule your instagram posts programmatically without relying on limiting and expensive apps like Hootsuite and Later. You can create your own code to post to instagram up to 25 posts a day using the Instagram Graph API.

Can Instapy post on Instagram?

instapy-cli ⚡You can upload posts and even stories on Instagram.


2 Answers

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

And here is an example how to upload 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();
}
like image 179
jedi Avatar answered Oct 03 '22 02:10

jedi


Uploading on Instagram is possible.

POST https://instagram.com/api/v1/media/upload/

Check this code for example https://code.google.com/p/twitubas/source/browse/common/instagram.php

My challenge is out for people to fix this script so it is stand alone!

like image 28
reidjako Avatar answered Oct 03 '22 03:10

reidjako