开发者

Open Graph pages: can I use a stub/forwarding page?

I have a page containing a list of activities. I want multiple FB Like buttons: for the page itself and for each of the individual activities.

In order for the page itself to be Liked, it needs OpenGra开发者_开发问答ph tags. But if the page has the tags, then the Like button, according to the docs, will ignore the url parameter of the Like buttons. From the docs:

When you use Open Graph tags, the Like button posts a link to the og:url instead of the URL in the Like button code.

Possible solution So, my idea is to create small stub pages that will only contain the Open Graph tags and a meta redirect tag to the real activity page.

Has anyone tried this? Or some other solution to the problem?


Your solution is feasible, I have tried it before: creating separate pages that only contain OG meta tags. However, the problem with this is, once a user likes the item, it posts automatically on the user's wall saying "Larry likes a link". When his friends see this, and click on the attached link, they will see a white screen (your og:meta-only pages). but since you said you will have redirect then this is good.

On the side, you had a wrong interpretation about this quote:

When you use Open Graph tags, the Like button posts a link to the og:url instead of the URL in the Like button code.

It doesn't mean "When you use Open Graph tags on the root page". It means when you use Open Graph tags on the pages you were linking to in the like buttons.

Also, what it meant by "posts a link" is posting a link on the user's wall. Liking open graph pages automatically posts to wall now. It didn't say "using the link" on og:url of the current page.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜