-
Notifications
You must be signed in to change notification settings - Fork 37
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
Facebook share not receiving og:meta tags #13
Comments
@SdShadab — From what I can see the meta elements are replaced correctly. What button are you clicking to share the post? Can you maybe post a screenshot or exact instructions? Thanks! |
Hi @jvandemo Please look at the screenshots attached. http://ec2-52-77-225-241.ap-southeast-1.compute.amazonaws.com/article/govt-to-spend-tk-119332cr-to-upgrade-coxs-bazar-airport I am talking about sharing via Disqus share. As you can see, its showing the old meta tags and not the updated ones. |
@SdShadab — Here the Twitter share button renders the correct title. I can't check the Facebook one because I don't have a Facebook account. I suspect that if anything goes wrong, it may have to do with detecting the title before angular-meta-update had a change to update it. I can see from the Disqus documentation that you pass in the title manually using So in your case that may be the solution to make sure the correct title is used in the share actions. I don't feel it has anything to do with this library directly. Does that make sense? Thanks! |
I have this issue too, when I copy my app url, Facebook gets the original meta (inside index.html) |
I'm currently trying to decide whether to use this or to simply create statically generated versions of the assets on my site that make sense to share and have the server-side template generate this stuff. So this issue is important to me as well. I'd also like to be able to use this same methodology for <link..... elements as well, to support Oembed. I guess the issue here is: does facebook curl the page, or crawl it? If it crawls it, it seems like it should be working unless the formatting of the tag is wrong somehow. If it curls the page, it will always get the defaults, and this module won't work. Of course this depends on the implementation of SEO on your site, and whether or not it is actually serving the cached pages to the requester. |
According to this StackOverflow post the Facebook Scraper does not run JavaScript. Does anyone know if this information is still accurate? |
+1 |
So, what I have found is two things:
I went ahead and just made a permalink (server-generated) version of my sharable content. The reason I say the above is that I tested out several things, including using update-meta along with phantom.js-generated cache pages when serving crawler requests. Nothing worked. So if someone smarter than me can get cached pages to trigger whenever it sees requests from other servers rather than other users, that will fix the issue. That being said, this doesn't appear to be an issue with update-meta, which I'm still using and which works nicely. |
@tutley — Thank you for the update! I have labeled this issue with "help wanted". I think you are right in that it may have something to do with the Facebook crawler, but I am not familiar with its exact internals. Hopefully someone who knows more about the crawler can jump in and help. Would be great to learn why it happens and if/how we may be able to tackle the problem. Thanks again for all your help (others too)! |
Facebook cannot parse javascript. For that you may use a rendering service like Prerender.io (they have a free tier, up to 250 pages), If you have a nodejs server to spare, you can even install their open source service. Hope it helps. |
@urbgimtam — Thank you for your input. This library works well with prerender.io so it appears that may be the only way (for now) to make sure Facebook uses the correct values. I will close this issue for now. Should anyone have any other question or remark, please don't hesitate to re-open it. Thanks! |
What about Youtube, It seems to use an hybrid approach, “is like an ajax app or single-page application (spa) and the same time is classic app where the page is rendered in the server”, when you request some video, you get a processed page, all meta tags has the video related data, but when you change to other video, the meta tags are not updated. So seems to be in this way you can avoid this directive, prerender, seo4ajax, brombone, etc. So what do you all think? |
Well, I already confirmed this, but not all, this directive is very useful, i use to update the title, the hybrid approach that have youtube, is really good, and the best is you can avoid prerender, seo4ajax, brombone, etc. And basically just you need to process the meta tags index.html, i use http://handlebarsjs.com/ for this. Demo: |
@romelgomez — Thank you for your feedback, much appreciated! |
@jvandemo Thanks, I like to help, here i extend the explanation with example code: https://github.com/romelgomez/single-page-application-seo |
@romelgomez — Super, thank you for sharing 👍 |
The angular site: http://ec2-52-77-225-241.ap-southeast-1.compute.amazonaws.com/article/poor-left-behind-at-climate-talks is using (successfully) this directive and the tags are being updated. However when I try sharing it (the post share is currently using the feed method) I get the default meta tags.
Even facebook debugger is not showing the current tags..
Also, the facebook sharing on Disqus is not working as it is using Facebook share dialogue.
Could someone shed some light on what's happening?
The text was updated successfully, but these errors were encountered: