Davincible / goinsta

Unofficial Instagram API written in Golang (v2022)
MIT License
182 stars 54 forks source link

Missing Feature: Repost Post #16

Closed greg-lancet closed 2 years ago

greg-lancet commented 2 years ago

Hello, thanks for the great & powerful api. I was wondering if reposting posts was part of this project or was not implemented? If needs to be I can implement it just want to know if I'm doing work for nothing or no.

Davincible commented 2 years ago

It could be done, but reposting is nothing more than grabbing the pic and caption, and posting it. Seems to be more of a user feature than something that would need to be in goinsta.

It could be added to examples or the wiki

Rudimentary example:

    img, err := item.Download()
    if err != nil {
        panic(err)
    }
    b := bytes.NewBuffer(img)

    newItem, err := insta.Upload(
        &goinsta.UploadOptions{
            File:    b,
            Caption: item.Caption.Text,
        })
greg-lancet commented 2 years ago

No I mean, in mobile insta you can repost a picture

Davincible commented 2 years ago

Ah, didn't know about that. Also on android?

greg-lancet commented 2 years ago

yeah, just click the arrow button of a post and click add picture to story

Davincible commented 2 years ago

Oh you mean share a post on story. Yes I can look at that sometime. If you want you can also work on it

Davincible commented 2 years ago

I just had a look at the 'add to story' functionality, and the moment you click the button, the story editor will show up, after you click add to story, the story editor will export the story locally to an image, and upload the image itself to the server. This thus means that all image processing is done locally on the app itself, instead of the server. As goinsta does not include image processing, I cannot simply rebuild the entire story editor. So, unfortunately, it will not be possible to support this feature.

If you would want to implement this yourself, perhaps you could create a photoshop template, download the post image through goinsta, fill the template with the image, and then upload the exported media to your story.

I'm sorry for the disappointing result after all this time.