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.

StickerBuilder issues

See original GitHub issue

Form

Put an [x] if you meet the condition, else leave [ ].

I’m pretty experienced with the library now and am using it to read timelines, search, like/unlike, and save/unsave.

Question

I’m trying to post a story with a media attachment sticker. I’m using a call similar to the sample code.

const bg = await fs.readFile("red.jpg");
const options: PostingStoryPhotoOptions = {
  file: bg,
  stickerConfig: new StickerBuilder()
    .add(
      StickerBuilder.attachmentFromMedia(
        (await this.client.feed.timeline().items())[0]
      ).center()
    )
    .build()
};

await this.client.publish.story(options);

I can see in my debugger that the options look filled in.

Screen Shot 2020-03-20 at 10 53 03 AM

But the story which is posted contains only the uploaded image, which is just a red background:

IMG_0773

I tried a simpler post:

const bg = await fs.readFile("red.jpg");
const options: PostingStoryPhotoOptions = {
  file: bg,
  stickerConfig: new StickerBuilder()
    .add(
      StickerBuilder.hashtag({
        tagName: "insta"
      }).center()
    )
    .build()
};

await this.client.publish.story(options);

But I got the same result, no sticker.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
endquotecommented, Feb 20, 2021

@seanraad123 I haven’t tried video, but it looks like client.publish.story will take PostingStoryPhotoOptions or PostingStoryVideoOptions. Both take the image/video as a buffer.

This new remotion library looks like a cool way to build a video.

0reactions
seanconrad1commented, Feb 20, 2021

@endquote appreciate it, I’ll check those out!

Read more comments on GitHub >

github_iconTop Results From Across the Web

StickerBuilder | Firebase - Google
public final class StickerBuilder extends IndexableBuilder<StickerBuilder>. Builder to construct an Indexable for a sticker.
Read more >
Can't set x/y for a sticker when adding a story #1127 - GitHub
And this problem exists in all of the stickers. I can't use "x" (y, witdth, height) parameter in all StickerBuilders.
Read more >
Problem in adding custom stickers to Gboard using Firebase
I followed this tutorial Creating a custom Gboard sticker pack but it won't work and no sticker is added to Gboard.
Read more >
Why Sanitation Stickers Are Becoming a Problem for City Hall
The sticker-builder starts with the desired stickiness and works backward. “Let's say you want an adhesive with a certain peel force and a ......
Read more >
Nail Art Kits 5Pcs Reusable Aluminum Extension Pallets Tips Forms ...
Choose the cheapest nail art kits 5pcs reusable aluminum extension pallets tips forms sticker builder form guide stencil manicure tools of high quality...
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