添加Facebook喜欢每个帖子

I am trying to add facebook like button in every idea user posts. I followed the answer

How to embed a facebook like button on every webpage of my website? .

My URL is like this type :

mydomain.com/index.php?menu=post&post_id=12

I add the URL to facebook upto mydomain.com/index.php?menu=post . Now if I like the post with post_id 12 and then visit say post with post_id 13, it is already liked ! Where I am doing wrong ? I am using smarty template engine.

When you put the button's HTML into your website, don't specify a URL at all. That way, it will take the URL of whatever page it's placed onto automatically.

if you are using fb meta tags for the like, it takes it from the index page. your going to need to change the title, and all the meta tags everytime post_id changes.

Search google for several like scripts, and you could implement your with that.

Hope I helped!