Johnny Oshika
Johnny Oshika

Reputation: 57502

Facebook Like Button for Specific Tab and Url in Facebook Page

I'm trying to include a Facebook Like button for my App Tab in a Facebook Page. For example:

http://www.facebook.com/pages/PageName/PageId?v=app_AppId&app_data=article-1 http://www.facebook.com/pages/PageName/PageId?v=app_AppId&app_data=article-2 http://www.facebook.com/pages/PageName/PageId?v=app_AppId&app_data=article-3

I'd like all 3 of the URLs to have their own "Like" buttons. Unfortunately, for both the iframe and fbml vesions of the like button, it seems like Facebook treats the like button as an overall Page like button. i.e. if a user has "liked" the Page, then they would have liked all 3 links above.

Is there a way to treat these "like" hrefs as unique?

Thanks

Upvotes: 2

Views: 1310

Answers (2)

Ben Dunkle
Ben Dunkle

Reputation: 320

I found this doesn't work well. When the user clicks the like button, it says something like "I liked 301 permanently moved" instead of the name of the link. I think facebook is detecting that the link is not actually on facebook and things are getting screwed up.

Upvotes: 0

Juan Uicich
Juan Uicich

Reputation: 148

You can pass a different URL than the current page as the href parameter of the Like button. The way I solved it is by having the content available on a stand alone URL, without query strings (http://example.com/article/3) which redirects to the Facebook page tab using JavaScript.

When the user "likes" the content, the Facebook scraper hits the stand alone page, and since it doesn't follow the JavaScript redirect, it picks up the Open Graph tags correctly, and counts the likes for each article separately.

Upvotes: 3

Related Questions