reddit / devvit

Reddit for Developers
https://developers.reddit.com
BSD 3-Clause "New" or "Revised" License
59 stars 13 forks source link

A way to get the post or comment from a share link #60

Open pl00h opened 3 months ago

pl00h commented 3 months ago

About a year ago, Reddit introduced a form of link that has sharing information for easier tracking.

Example post link: https://www.reddit.com/r/unitedkingdom/s/i1ISuc5IKa

Unfortunately, it's not possible using Devvit to determine where links like this lead to, or even if it's a post or comment that's referenced.

It'd be great if we had a way to resolve these links to the original permalink, or to a post or comment object. HTTP Fetch could theoretically be used for this (to find out where the redirect leads) but reddit.com is blocked.