question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Share Posts as story

See original GitHub issue

I have tried to share a post as story with the code for uploading stories, but turns out it gives error because no file is given. image My code is this:

await ig.publish.story({
    media:{
      media_id :media_id_of_certain_post,
    }
  });

Is something I am missing?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:21

github_iconTop GitHub Comments

3reactions
xfrcccommented, Nov 14, 2021

For gradient background this should do the work

 const canvas = createCanvas(1080, 1920);
    img = new Image;
    img.src = postImageBuffer;
    const context = canvas.getContext('2d');
    const x = (canvas.width  - img.width) * 0.5;
    const y = (canvas.height - img.height) * 0.5;
    const grd = context.createLinearGradient(x, 0, x, canvas.height);
    grd.addColorStop(0, 'red');
    grd.addColorStop(1, 'blue');
    context.fillStyle = grd;
    context.fillRect(0, 0, canvas.width, canvas.height);
    context.drawImage(img, x, y);
    const final = canvas.toBuffer('image/jpeg');
3reactions
Nerixyzcommented, Aug 16, 2021

is there a chance of having this feature again in the future?

Maybe

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I share someone's post from Feed to my Instagram ...
Tap below the photo or video in Feed. ... Tap Add post/video/reel to your story. ... Tap in the bottom right. ... Tap...
Read more >
How to Share Posts From the Instagram Feed to Stories - - Buffer
How to share feed posts to Instagram Stories · Tap the paper airplane button below the post (like you would to send a...
Read more >
How to Repost and Share to Your Instagram Story
1. Open the Instagram app on your phone. ; 2. Locate the post you want to share in your Instagram story on your...
Read more >
How to Share a Post to Your Instagram Story - Alphr
Launch the Instagram app and locate the post you'd like to share. · Tap on the “paper airplane” button appearing below the post....
Read more >
How to re-share a post to your Story on Instagram - Dexerto
Open Instagram. · Go to the post you want to share to your story. · Click on the triangle share button beneath the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found