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

Not seeing title/description when copy/pasting site url to facebook/twitter #51

Open
tomwayson opened this issue Mar 30, 2017 · 3 comments

Comments

@tomwayson
Copy link

I've installed the addon, configured, and if I inspect document.head I see the expected title/description in meta tags:

<meta ember-sharable="true" name="twitter:card" content="summary"><meta ember-sharable="true" property="og:title" content="ArcGIS Open Data"><meta ember-sharable="true" property="og:description" content="Snippet is shorter."><meta ember-sharable="true" name="twitter:title" content="ArcGIS Open Data"><meta ember-sharable="true" name="twitter:description" content="Snippet is shorter.">

I should note that I do not see those tags when viewing the page source. I suppose that's expected?

Anyway, when I copy and paste the link into a FP post I see:

image

That "Wheat" appears to be coming from an inlined SVG in the site's body that has a title tag.

<svg xmlns="http://www.w3.org/2000/svg" style="display: none">
<symbol id="ember-arcgis-layout-cards-icon-Agriculture2" viewBox="0 0 120 120">
	 <title>Wheat</title>
<g>...</g>
</symbol>
</svg>

That's the first <title> tag in the document. I guess inlined tags trump the meta tags? Even so, it does not appear to be picking up the description from the meta tags.

When I try to share on twitter, I don't see title or description:

https://twitter.com/opendatatest/status/847577942045609986

You may be able to inspect the actual site if you browse it soon at: http://opendatadev.arcgis.com/

However that's our dev server and likely to be paved over in the next day or so.

I'll try to make a build w/o the inlined SVG to get that out of the equation, but is there anything else I should be doing to get this to work?

@tomwayson
Copy link
Author

FYI - I've deployed a build that removes the title tags from the SVG elements, but I was still seeing the "Wheat" title in preview. I figured there might be a sever-side cache on that, so I threw on a random query string and I no longer see "Wheat", but just like sharing w/ Twitter, it does not appear to pick up the title nor description from the meta tags:

image

So the meta tags appended by the addon just don't seem to be working for our app in either Facebook or Twitter.

@tomwayson
Copy link
Author

Do you have an example of a site with this working that I can use as an example to see that I've got things configured properly? I tried sharing https://mike.works/oss/ember-sharable on Facebook, and I see:

image

I'm not sure if those are coming from this addon though? That info appears to be coming from meta tags that, unlike my site, I can see in the dom when I view soruce, and these appear to be actual ember components:

  <meta name="twitter:card" content="summary" id="ember28585474" class="ember-view">

  <meta name="twitter:site" content="@MichaelLNorth" id="ember28585475" class="ember-view">

  <meta property="og:title" content="Mike.Works" id="ember28585476" class="ember-view">

  <meta name="twitter:title" content="Mike.Works" id="ember28585477" class="ember-view">

  <meta property="og:description" content="Up-Level your team with world-class on-site developer training" id="ember28585478" class="ember-view">

  <meta name="twitter:description" content="Up-Level your team with world-class on-site developer training" id="ember28585479" class="ember-view">

  <meta name="description" content="Up-Level your team with world-class on-site developer training" id="ember28585480" class="ember-view">

@mjuniper
Copy link

mjuniper commented Mar 31, 2017

I don't see how this could work unless you are using fastboot. Is that assumed to be the case? That would account for what @tomwayson is seeing.

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

2 participants