For some reason when sharing a link on Twitter item image is not being displayed. It displays default grey image.
However it works fine when you post link to Facebook timeline (item image is being displayed).
How to fix that?
For some reason when sharing a link on Twitter item image is not being displayed. It displays default grey image.
However it works fine when you post link to Facebook timeline (item image is being displayed).
How to fix that?
After reading many articles I think it has something to do with Twitter Card. It seems that Sharetribe has all needed twitter meta tags…but as I said image thumbnail is not being generated and it only displays default twitter image. This makes Twitter page look very grey
Anyone knows how to solve this ?
I was able to figure this out. My issue is that the %meta{ :name => "identifier-url", :content => "#{@current_community.full_domain(with_protocol: true)}"}
was pulling in http
, but Twitter was needing https
. I was already running SSL and forcing it, but there was mixed content.
The fix for me was to create a variable my_domain
on /app/views/layouts/_marketplace_head.haml
like follows:
- my_domain = "https://www.bowlermarket.com"
then combine my_domain
with meta_image
on the twitter:image
property like so:
%meta{ :name => "twitter:image", :content => "#{my_domain}#{meta_image}"}
So how do you relate “identifier-url” meta tag with “twitter:image” meta tag?
The actual problem was that twitter doesn’t support relative paths.
This combination creates an absolute path %meta{ :name => "twitter:image", :content => "#{my_domain}#{meta_image}"}
Thank you so much for your post. This solution works perfect. I hope it is integrated in to next update of Sharetribe.