I am not sure if I should be doing something differently.
Check out these two posts.
I am not sure if I should be doing something differently.
Check out these two posts.
onebox works when the site being âboxedâ has correctly implemented OG tags (or other recognisable content tags) so that the preview can be created
I believe that is the case here (in the second example there is not much content to be presented in the summary)
You will notice it works on some Wordpress sites and not others for the same reason
Nothing you can do about it if the site itself has not optimised itself
Makes. Sense. Thanks.
The tags that need to be present in the page are OpenGraph and/or oEmbed. Feel free to search for info about either of those.
Use http://iframely.com/debug to test as needed
According to http://ogp.me/ the four required tags for OpenGraph are title, type, image, and URL. What I donât understand is why this url works (i.e. is being oneboxed), even though the only OG tag on that page is og:image (according to http://iframely.com/debug)
while this one does not work even though it works fine on facebook )in supports three out of the four required tags):
Very popular, world famous websites have custom oneboxers. Everyone else falls back to opengraph and oembed.
Okay, this page
now supports all four requried OpenGraph tags, title, type, image, and URL, (see here on iframely) but it is still not being oneboxed by discourse.
Could you specify what other tags discourse requires for oneboxing?
Not true. I see no summary opengraph tag in iframely. How can you possibly summarize an URL without an actual summary??
Pretty much all I know about OpenGraph is from http://ogp.me/ and there it does not mention the summary tag as a requirement. But I hear you say: discourse wants the summary tag, which is fine. I will let the admin of that website know (Iâm just helping them in getting their pages oneboxed in discourse).
You can do a onebox using just the title and the image, no? And not that I expect discourse to do that, but facebook even manages to compensate for missing summary tags, probably by parsing the page for other hints.
Summary is required otherwise there is no summary.
Just to be clear: by âsummaryâ you mean the og:description
tag, right?
With the og:description
tag it now works here on meta but on my site that particular url that I have used over and over again for testing on my site still doesnât get oneboxed (other urls on that site do).
It looks like some caching or rate limit thing to me. How can I get my instance to forget everything it knows about that url and start from scratch. Or, if nothing is being cached locally, how to I get my instance to bypass any other caches and get the page straight from the source server?
Good question, @eviltrout?
You can add bogus querystring to the URL like
http://example.com/foo
vs
http://example.com/foo?x=1
If you edit a post containing the onebox, itâs supposed to pass the refresh
flag through so it refreshes. Otherwise we rely on the cache.
In all this testing, I have not published a single post on my site, I only looked at the preview in the editor. Might this explain things, i.e. that no refresh flag was sent?
Yes previewing will always use the cache to avoid constantly requesting the same thing. If you need to refresh the onebox after a code update or something, try editing and saving the post again with minor changes.
Which cache are we talking about, though? Because since I never actually saved the post, where would the page be cached? In other words, this is not about changing an existing post but just trying (previewing) the same url repeatedly with 6-12 hours in between tries.
Requests to the local onebox URL (which is called to expand links) has a cache. It is called when previewing and saving the post.
This is not working. Edit and save does not seem to cause a refresh. It keeps using the cached version.
Did you make any changes to the post when you edited it? If the content hasnât changed we wonât save it. I often try adding a space or a word somewhere.