Site url for facebook button
I have a problem with the Facebook button. I want the user's profile note to look something like this: “The user likes a page on the site .
The site url is supposed to be " http://www.example.com/myapp/
" and the page url "t21>".
I added <meta property="og:site_name" content="..."/>
to any page and added like button using <iframe>
.
I know there is a solution to specify the canonical url, but for a page that the user likes and not for the site (that is, with a help og:url
in the header). Does anyone know how you can specify the url of the site? It somehow automatically points to the domain name, which is wrong in my case, because I need " http://www.example.com/myapp/
", not " http://www.example.com
".
I want to get the following result: User likes 'on ', not User likes 'on '. http://www.example.com/myapp/page.html
http://www.example.com/myapp
http://www.example.com/myapp/page.html
http://www.example.com
Thanks a lot for the possible answer.
a source to share
We ran into similar issues and og:site_url
had to do a little hack instead of tagging . Our solution is to have our base URL ( http://www.example.com
in your example) redirect to an FB page.
As more FB pages are added, we'll need multiple subdomains to support this, so it's not really robust, but it might fix your problem at least temporarily.
a source to share