Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload Picture Problems #40

Open
ogcyborg opened this issue Dec 1, 2020 · 2 comments
Open

Upload Picture Problems #40

ogcyborg opened this issue Dec 1, 2020 · 2 comments

Comments

@ogcyborg
Copy link

ogcyborg commented Dec 1, 2020

I'm trying to upload a picture with the following code;

var picturePath = path.basename('/home/ubuntu/Tools-for-Instagram/IGPost_01.png');
let caption = "This is a test image that I'll delete in a few seconds";
var namesToTag = [];

try {
await uploadPicture(ig, caption, myPicturePath, namesToTag);
}catch (error) {
console.log("Error could post image to Instagram: " + error.message);
}

Error:
Error could post image to Instagram: POST /rupload_igphoto/1606853056495_0_6880353997 - 400 Bad Request;

Using uploadPictureByURL

let pictureUrl = "https://www.website.com/storage/app/media/postImages/IGPostImage_01.png";
let caption = "This is a test image that I'll delete in a few seconds";

try {
    console.log("trying to post an image");
    await uploadPictureByUrl(ig, caption, pictureUrl);
} catch(error) {
    console.log("Error could post image to Instagram: " + error.message);
}

Error:
IgResponseError: POST /rupload_igphoto/1606852939576_0_7864407481 - 400 Bad Request;

Any ideas on what could be happening?

@therealamirch
Copy link

same thing.. any suggestions?

@Nerixyz
Copy link

Nerixyz commented Dec 22, 2020

You're uploading a .png, only JPG files are supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants