I am developing a website in localhost and I want to have a Facebook share button which shares a page of my website. For now the page I would like to share is only local.
The share button works fine when href
in FB.ui
has a public available URL. It lets me share content even whit other URLs (e.g. dev.myapp.com/mypage
) but this content does not appear on Facebook (probably because Facebook detects that this page does not exists (yet) in the web.
Funny stuff is, if I use the Facebook share button (the one provided by facebook) the content is posted even if it is only local.
So, is there a way to share local content while we are under development?
You have 2 options:
localhost:xxxx
as your site URL and localhost
as one of your
approved app domains. You can only have 1 site URL, so you may need
the second option if your app is in production...In both cases, you have to be on developers.facebook.com
on your app page > settings > Add platform > website.