I'm writing an app. for Facebook using HTML and Javascript. I'm trying to detect with javascript when the "Like" button on the Facebook page is clicked. I don't want to embed a "Like" button on my app 开发者_JS百科page as Facebook already has a "Like" button at the top of the page right after my company's name.
I'm using Facebook's iFrame to display my app, but I haven't found any examples in Javascript to catch the "Like" click event.Thanks for any help
Because it is in an Iframe the same origin policy applies. You cannot access content cross-domain. It is a security violation.
On Facebook Pages, this is done through the Static FBML app. However, Facebook phased it out on 18 March 2011, but pages using the app before that date (including BobbiBrown) will continue using it.
精彩评论