Show Content After Facebook Like
So is there any working code in HTML/PHP that makes certain content () available only after the user clicks th开发者_如何学Goe "Like" button. It's not an app, just an external website.
There is a callback when a Facebook button is 'liked' using Javascript
It's documented here http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/
The event is called edge.create
by the looks of it.
There is no way to achieve your desired result - unless the user in question is also authenticated via facebook on your site, but I don't think that's the case.
The js like callback will (being a callback) only work after the user clicks like.
The thing you'd like to do is only possible within facebook pages' iframes, that are called with a signed request containing the current user's facebook id.
精彩评论