开发者

Problem sharing content from "private" site on facebook

I have a website that you can only access after login.

I want to be able to share some products on it, but when I click the share button, instead of sharing that particular item, it shares the the content for the main site.

It's like this, an example:

Main Site: www.xyz.com Main site title: xyz.com Main site description: site xyz

Product Site: www.xyz.com/product_b.php Product page title: Product B 开发者_JAVA技巧Product page description: check out this amazing product

When I click the share button on the product page, instead of sharing the product information, it shares the main site information... I guess it's related to being a private site...

I'm using addthis.com buttons to do it, but it's the same when I try to do it directly on facebook...

any ideas on how to solve this?

Thanks, Luis


If a non-authorized user will be redirect to the "main site" then obviously Facebook (when trying to get the details of the shared page) will be redirected to the same page too!

From the documentation:

The user agent of the scraper is: "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"

So you may capture this and allow access for Facebook scraper, but I really don't think you should do this (ethically). Instead, make a public page for each product were minimal data is shown and encourage users to register to view the full product page!

Just a side note (a reminder), always use the Open Graph meta tags.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜