RaminBoodaghi
RaminBoodaghi

Reputation: 40

I cant upload photo using mgp25 Instagram-Api

Im using mgp25 Instagram-Api library in my projects
When i want to upload a photo i get an error: Invalid request options
My image is 629 x 629 pixels and jpg format.

my code:

if($shouldProcess){
    $photo = new \InstagramAPI\Media\Photo\InstagramPhoto($target_file);
    $uploadResult = $insta->timeline->uploadPhoto($photo->getFile(), ['caption' => $caption]);
}else{
    $uploadResult = $insta->timeline->uploadPhoto($target_file, ['caption' => $caption]);
}

Thanks!

Upvotes: 0

Views: 1169

Answers (1)

Ankush Raghuvanshi
Ankush Raghuvanshi

Reputation: 1442

The mgp25 Instagram API is not available anymore because of dmca takedown. See this -> https://github.com/mgp25/Instagram-API

Upvotes: 1

Related Questions