No open graph link previews for Mozilla and Firefox URL's


(Arnold Schrijver) #1

I just noticed that in a post no link previews are generated for Mozilla and Firefox URL’s, while iFramely.com and opengraphcheck.com both show all metadata is in place:

https://blog.mozilla.org/blog/2018/08/28/lets-be-transparent/

https://data.firefox.com/

(first posted here, but this is a separate, maybe related issue)


Ignore favicon, use default open graph image to create og:image tags
(Jeff Atwood) #2

The last few times we looked at similar issues, the target site had blacklisted most user-agents; this was on WP-Engine.


(Arnold Schrijver) #3

I don’t understand what you mean by target site. Are you saying that Mozilla / Firefox blocked Firefox browsers (I use FF) from generating the link preview? Or that the target site (that would be Discourse in this case, both Meta and our forum) does the blocking?

Edit: On the linked post, I had troubles getting LinkedIn to generate a preview, but for the URL’s above LI is working fine. If LI is able to generate the preview (they use open graph too) shouldn’t Discourse be able to do that too?


(Rafael dos Santos Silva) #4

The onebox is made server side, so it’s not your browser that was blocked bout the Discourse server up, or the Discourse request user agent.


(Arnold Schrijver) #5

Thx, for mentioning onebox, I see it in code now: onebox/helpers.rb at master · discourse/onebox · GitHub and what is used as User-Agent probably "Discourse Forum Onebox v#{Discourse::VERSION::STRING}"


(Rafael dos Santos Silva) #6

Yes, you can use that info to try and repro the error with a curl that uses that user agent.


(Arnold Schrijver) #7

It is a pity you are having this problem. I can imagine now it occurs on many sites. Since the preview is generated on behalf of a forum users, and as part of a request send to your server, couldn’t you just forward the User-Agent of that particular user? Or is that a no-no (one IP, differing user-agents). Or use a common, fixed User-Agent (but remote can’t see it is onebox then)?