How to submit a link including a flair
See original GitHub issueI am submitting links successfully with this code:
const response = await redditAPI
.getSubreddit('amihot')
.submitLink(
{
title: newRedditPost.title + ' ' + subreddit.titlePostfix,
url: newRedditPost.imageUrl
}
)
However, some subreddits require the use of flairs. See for example this one: https://www.reddit.com/r/amihot/submit The flair is actually mandatory. How do I submit a flair as I post? I tried this:
const response = await redditAPI
.getSubreddit('amihot')
.submitLink(
{
title: newRedditPost.title + ' ' + subreddit.titlePostfix,
url: newRedditPost.imageUrl,
flair: "Female"
}
)
But it didn’t work.
Thanks!
Kara
Issue Analytics
- State:
- Created 2 years ago
- Comments:14
Top Results From Across the Web
How To Add Link/Post Flairs on Reddit - YouTube
How To Add Link / Post Flairs on Reddit. Watch later. Share. Copy link. Info. Shopping. Tap to unmute. If playback doesn't begin...
Read more >What Is Reddit Flair (and How to Use It)
If you want to add a post flair to an existing post, open it first, then select the three-dots menu icon > Add...
Read more >What is Reddit flair and how to flair a post
Click on “ADD USER FLAIR” just below your name. Choose your preferred flair from the list and click “APPLY” to save changes.
Read more >How to submit link flair with a post? I keep getting a 400 error
Submitting with a title and url works fine. Code is as follows: subreddit.submit(url='whateverurl.com', title='Test Title', flair_text='This ...
Read more >What Is Reddit Flair? How to Use It
In the latter case, select the Choose Community button in the upper left of the Post editor. Selecting a community will reveal the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
Just opened #317 that will fix this. After it’s been verified and merged I’ll release a new version with this fix.
I believe you will then be able to do:
If that doesn’t work you might have to add
flair_text: ''
to the form as well. But I doubt it as it would only be used if you can edit the flair textI am sorry for the noise… I was just wondering if these two branches made it into the main program?
feat/flair-templates-newlink
feat/submit-options
I am sorry if the answer is obvious, I don’t know how to check