dilame / instagram-private-api

NodeJS Instagram private API SDK. Written in TypeScript.
MIT License
6k stars 1.14k forks source link

Story poll #1361

Open PenguinOfTheSky opened 3 years ago

PenguinOfTheSky commented 3 years ago

Story poll generated poorly-formatted answer options (half off screen), and the actual question didn't show up at all. Can anyone give me a tip on waht i'm doing wrong?

obj.poll =  {
          question: msg.poll,
          viewer_can_vote: true,
          is_sticker: true,
          viewer_vote: 0,
          height: .4,
          width:.5,
          x: .5,
          y: .5,
          rotation: 0,
          tallies: [{
            text: 'Yes',
            count: 0,
            font_size:10
          },{
            text: 'No',
            count: 0,
            font_size:10
          }]
        }
PenguinOfTheSky commented 3 years ago

Tried using sticker builder from the example to see if that would help but that didn't show up at all... though one of the comments suggests maybe it's supposed to be invisible? though if it's invisible i'm not sure what the point is of it....

{
        video: await readFileAsync(__dirname+'/public/images/' + msg.video),
        coverImage: await readFileAsync(__dirname+'/public/images/' + msg.cover),
        caption: msg.caption || '',
        stickerConfig: new StickerBuilder()
        .add(
          StickerBuilder.question({
            question: msg.poll,
          }).scale(0.5),
        )
        .build()
        //poll: msg.poll || ''
      }
seanconrad1 commented 3 years ago

@PenguinOfTheSky also running into the invisible issue. Not sure how to get around it just yet

austinhuang0131 commented 3 years ago

https://github.com/dilame/instagram-private-api/issues/1058#issuecomment-578230240

You need another image library to actually edit the image so to put the sticker (which you need to figure out what it looks like) on it.

seanconrad1 commented 3 years ago

@austinhuang0131 thanks! I did end up figuring that out. For anyone who runs into this I solved my problem using ffmpeg