Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate posting images with social media share #1021

Closed
flibbertigibbet opened this issue Mar 29, 2018 · 8 comments
Closed

Investigate posting images with social media share #1021

flibbertigibbet opened this issue Mar 29, 2018 · 8 comments
Assignees

Comments

@flibbertigibbet
Copy link
Contributor

Share relevant static image (destination image or blog post image) when sharing to social media.

@flibbertigibbet
Copy link
Contributor Author

Blocked by #1023

@lederer
Copy link
Contributor

lederer commented Apr 9, 2018

I interpreted the issue here as unrelated to sharing buttons per se, in which case #1023 need not be a blocker. As long as the page has a legit <meta property="og:image" … > tag, the preview image should show up in FB regardless of the sharing mechanism (eg, share button vs. manually pasting the link into FB). I think that was the only real concern.

@flibbertigibbet @jcahail Were your takeaways different?

@flibbertigibbet
Copy link
Contributor Author

We have og:image tags set already for the relevant pages, so not sure what else we should be doing.

Was thinking of explicitly setting the image via a share dialog, to hopefully have more control over what the resulting post looks like.

@lederer
Copy link
Contributor

lederer commented Apr 9, 2018

Interesting. Facebook's Sharing Debugger doesn't seem to be finding the og:image. Seems to often think it's the logo, even when it's set in the html to something else.

Seems to be using the homepage as the scraped page, instead of the actual detail page itself. I think it may be due to og:url being set to the homepage, even for detail pages.

image

@flibbertigibbet
Copy link
Contributor Author

I wonder if the incorrect image reference found by the Facebook sharing debugger is possibly is related to the redirects on the canonical URL:

image

@flibbertigibbet
Copy link
Contributor Author

flibbertigibbet commented Jun 5, 2018

Looks like the image tags have a relative path. They should be absolute for Open Graph to resolve them.

On current production, they look like:
<meta property="og:image" content="/media/destinations/57a2720ffafd41649676b1646ed5e90c.jpg.680x400_q85_box-destinations/57a2720ffafd41649676b1646ed5e90c.jpg_crop_detail.jpg">

flibbertigibbet added a commit to flibbertigibbet/cac-tripplanner that referenced this issue Aug 3, 2018
Use full path for social sharing meta tags for place and event detail images.
Fixes azavea#1021.
@flibbertigibbet
Copy link
Contributor Author

Images seem to be getting parsed correctly now, according to the Facebook graph debugger:

A place

facebook_graph_debugger_place_detail

The home page (now using the new image)

facebook_debug_gophillygo

@flibbertigibbet
Copy link
Contributor Author

An article:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants