7

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!

reidjako
  • 384
  • 3
  • 4
  • 17

2 Answers2

5

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();
}
jedi
  • 61
  • 1
  • 3
1

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!

reidjako
  • 384
  • 3
  • 4
  • 17
  • Uhm, are you posting this Q/A pair to promote your script? – Damien Pirsy May 25 '14 at 08:58
  • Not my script, I spent about an hour looking for a script along this lines and finally found it @damienPirsy – reidjako May 25 '14 at 08:58
  • 5
    People aren't going to write your code for you, please don't mask it as a "challenge". You have three options; either learn how to write it yourself, pay someone to do it or find another solution. – Darren May 26 '14 at 10:14