# Onebox 挑战

**URL:** https://meta.discourse.org/t/onebox-challenges/102586
**Category:** Feature
**Tags:** onebox
**Created:** [2018年十一月23日 10:12 UTC](https://meta.discourse.org/t/onebox-challenges/102586 "2018-11-23T10:12:19Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2018年十一月23日 10:12 UTC](https://meta.discourse.org/t/onebox-challenges/102586/1 "2018-11-23T10:12:19Z")

</div>

Guys,

I’ve noticed that one boxing doesn’t always work.

[I’m aware of how it works with Open Graph](https://meta.discourse.org/t/rich-link-previews-with-onebox/98088) (no tags, fair enough)

I’m also aware it does more than just rely on OG in many cases. However there’s a lot of scope that falls outside of this?

I was curious how Facebook appears to reliably provide a preview when you post [a URL that does not have Open Graph support.](https://opengraphcheck.com/)

It looks as though, according to [Facebooks developer “preview debugger”](https://developers.facebook.com/tools/debug/sharing) they create a lot of the previews using the available raw tags.

Has anyone thought about implementing such a solution for Discourse? Has someone already had a go?

Forgive me for any unreasonable expectations or assumptions.

---

<div class="post-metadata">

### Author: ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)
#### Post date: [2018年十一月23日 10:24 UTC](https://meta.discourse.org/t/onebox-challenges/102586/2 "2018-11-23T10:24:15Z")

</div>

I’d also like to see this. Whilst it’s important to encourage OG adoption, we should have some kind of basic fallback (favicon, site title) so that Discourse users are not confused when they paste a URL into the title box and nothing happens.

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/f/0fdc64f149e19e837c6a861100d9878ab23a82ba.jpeg)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2018年十一月23日 10:28 UTC](https://meta.discourse.org/t/onebox-challenges/102586/3 "2018-11-23T10:28:13Z")

</div>

Yeah, I’m about to try and encourage a “quick-fire” sharing community off of Facebook and support for previews is imho a really important aspect that needs to be solid (and one of the reasons I got involved in contributing to the TLP plugin).

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2018年十一月23日 19:31 UTC](https://meta.discourse.org/t/onebox-challenges/102586/4 "2018-11-23T19:31:08Z")

</div>

Most websites these days are OpenGraph and oEmbed compatible. Which URLs are you seeing that are not?

---

<div class="post-metadata">

### Author: ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)
#### Post date: [2018年十一月24日 00:35 UTC](https://meta.discourse.org/t/onebox-challenges/102586/5 "2018-11-24T00:35:16Z")

</div>

> [@codinghorror](#):
>
> Most websites these days are OpenGraph and oEmbed compatible. Which URLs are you seeing that are not?

For my local community forum, we have trouble with links to our local council website. Example:

> **[Council tax](https://lewisham.gov.uk/myservices/counciltax)**
>
> Council tax is a tax set by local authorities to meet their budget requirement. It helps pay for the services the Council provides for the people of Lewisham.

Local government websites in the UK are generally quite old fashioned.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2018年十一月24日 13:39 UTC](https://meta.discourse.org/t/onebox-challenges/102586/6 "2018-11-24T13:39:54Z")

</div>

Oh … I think I’ve found part of the problem … on multiple sites (even on Meta) I can reproduce this:

When I paste a link into Title it doesn’t always convert into a Title … sometimes you are left with a URL. This is an intermittent issue … is this rate limited locally or remotely, somehow? Interestingly, once it works, you can delete it and it will work again instantly … as if being cached?

Rebuilding the HTML of the first post does not fix the Title even if it’s still a URL.

NB I don’t see any javascript errors on console when this fails.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2018年十一月24日 13:49 UTC](https://meta.discourse.org/t/onebox-challenges/102586/7 "2018-11-24T13:49:30Z")

</div>

That URL seems to be resolved by “iFramely” but that is not a free service.

> **[Iframely URL Debugger - Open Graph, Twitter Cards, oEmbed](https://debug.iframely.com?uri=https%3A%2F%2Fwww.lewisham.gov.uk%2Fmyservices%2Fcounciltax%2FPages%2Fdefault.aspx)**
>
> Check your URL against Open Graph, Twitter Cards, oEmbed specs. See what other apps see.

---

<div class="post-metadata">

### Author: ![John\_Smith3](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@John\_Smith3](https://meta.discourse.org/u/John_Smith3)
#### Post date: [2019年四月9日 06:14 UTC](https://meta.discourse.org/t/onebox-challenges/102586/8 "2019-04-09T06:14:57Z")

</div>

Is there a solution to this one box issue? I get about a 70% success rate on one box working.

Here’s a link to one of my pages where one box is not working:

[https://askwaikiki.com/t/local-food-beer-tour-feat-bon-jovy/1254](https://askwaikiki.com/t/local-food-beer-tour-feat-bon-jovy/1254)

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [2019年四月9日 06:21 UTC](https://meta.discourse.org/t/onebox-challenges/102586/9 "2019-04-09T06:21:00Z")

</div>

Have you verified whether that page contains valid opengraph data to onebox?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2019年四月9日 06:31 UTC](https://meta.discourse.org/t/onebox-challenges/102586/10 "2019-04-09T06:31:47Z")

</div>

Yes, check the target page source for those tags.

You could try `curl https://private-island-tours.com | grep \"og:` from your server as a quick check. If this comes back with no rows of source, you know you the page does not contain those tags or your server is being blocked from crawling.

In this case I cannot see the tags. You could reach out to the webmaster and encourage her to add them!

---

<div class="post-metadata">

### Author: ![John\_Smith3](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@John\_Smith3](https://meta.discourse.org/u/John_Smith3)
#### Post date: [2019年四月9日 07:06 UTC](https://meta.discourse.org/t/onebox-challenges/102586/11 "2019-04-09T07:06:11Z")

</div>

I have not, but I will ask, thank you.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2023年八月18日 08:52 UTC](https://meta.discourse.org/t/onebox-challenges/102586/12 "2023-08-18T08:52:51Z")

</div>

帖子已拆分为新主题：[在隐藏详情中显示 onebox](https://meta.discourse.org/t/displaying-oneboxes-in-hide-details/275672)
