Properly embed natively links on external sites/discord

Description of your request or bug report:
When posting, for example, an amazon link on an external website or in discord, etc. it automatically shows the cover, title and some info on the book.

image

It would be cool if natively links also showed cover, title and maybe rating or level or something. (We don’t have あらすじ on natively, so that obviously wouldn’t be shown.) Basically, what it already does in the forum:

https://learnnatively.com/book/b9c427b597/

(well, usually… doesn’t work right now. :rofl:)

Trello link: (leave in blank)

Do you know what Discord is looking for to do this? I found some references saying it uses the OpenGraph og:title etc meta tags, but Natively pages already set those.

1 Like

I think there’s some sort of error with Natively’s OG stuff rn. I run into this on Discourse a lot lately, when pasting Natively links

Sorry, we were unable to generate a preview for this web page, because the following oEmbed / OpenGraph tags could not be found: description, image

Probably that’s why it’s not working in Discord and elsewhere as well.

6 Likes

Argh, sorry you all! For some reason i’m loading some javascript above those tags which has caused issues for me in the past (you want to load meta tags first).

Will fix tomorrow, hopefully will resolve all issues.

8 Likes

Ok. @Biblio and others, please let me know if you continue to have issues with this. I moved down that js from the meta-tags, hopefully that solves the issue. I will leave this open for the time being.

1 Like

I just tested two book links on Discord and neither unfurled unfortunately :confused:

edit:

https://learnnatively.com/book/535acd6c94/

and

https://learnnatively.com/book/4e727091c6/

edit 2:

1 Like

so weird. According to this site it’s ok: Open Graph Tester - Best Tool to Debug Meta Tags for Free .

Doing another tweak, but less confident now :confused:

1 Like

Possibly relevant: when I look up og examples, the tags are self-closing, eg: <meta property="og:site_name" content="IMDb" /> , whereas on Natively they’re not, eg: <meta property="og:title" content="アステリズムに花束を 百合SFアンソロジー | L30??">. I don’t think that should make the difference, but might be worth a try anyway.

Ignore if unhelpful, but: I’d otherwise try making a scratch page & just deleting everything besides the tags, then re-adding one-by-one to try to pin down what script or other issue is causing the problem.

4 Likes

Well, I’ve figured out my issue. I implemented some bot control on AWS a few weeks ago and apparently it’s blocking some of these social media bots :sweat_smile:

I’ve gotten rid of it for now, will try to configure it better today.

Edit: Also do note that there is a 1-day cache. So all the links in this thread are cached to fail. New links will work though.

10 Likes

Names redacted for privacy reasons, but the happy reactions say it all. :rofl:

11 Likes

Great! I will go ahead and close this then :slight_smile:

3 Likes