Closed junogueira closed 5 months ago
I cannot reproduce this, especially not by pinpointing the issue to facebook.
I checked the demo at https://stefanobartoletti.github.io/nuxt-social-share/ and it actually is not using the correct URL, it is trying to share links with localhost
. So in example the share URL is something like https://www.facebook.com/sharer/sharer.php?u=http://localhost/nuxt-social-share
but for ALL networks, not just Facebook. This is creating some errors in some networks, but it is not a Facebook issue per se.
I will try to have a look and see what's going on there, probably some misconfiguration with obtaining the correct url.
Anyway, you can see a "real world" live example here https://nuxt-storyblok-starter.netlify.app/blog/article-8/ (scroll down to the end of the article), I tested and the share buttons are all working as expected, both on desktop and on mobile.
It would be helpful if you can provide more details about your specific implementation, with a minimal reproducible demo, and the environment where this issue is happening to you (OS, Browser, etc.)
Hi @stefanobartoletti, I'm going through the same.
I tried testing with the live example you provided and couldn't share as well:
My project:
My implementation, pretty simple:
My current environment OS: macOS Sonoma 14.5 Browser: Chrome
Thank you so much :)
I'm not sure what is happening here, I can see from your screens that you are always having a "localhost" shared, even on https://nuxt-storyblok-starter.netlify.app/blog/article-8/, where it should use instead the correct URL.
About your own example, I see that you are using it on your own local development server on localhost:3000
, so of course you are not able to share it on any social, because your local environment is not accessible to the web.
You should try to publish it online on some hosting platform and see if this still happens on your own implementation, and maybe share the details of the server (hosting platform, specific configuration, and so on)
Anyway, for what I can see, this seems to be related to how the current URL is retrieved internally, but at the moment I cannot give a solution, this has to be investigated further.
I opened a more generic issue here #177 , if you want to follow.
Thanks for checking the issue, Stefano.
Closing this and continuing in the more generic #177
Sharing to Facebook is not working, even on https://stefanobartoletti.github.io/nuxt-social-share.
Maybe they changed the URL for sharing? Didn't find anything on their docs yet.