facebookfbml

FBML: Toggle visibility of Facebook "Like" button


Is there a way to accomplish these 2 simple things:


Solution

  • The second thing you want to do is easy to do:

         FB.Event.subscribe('edge.remove', function(href, widget) {
         // run some jQuery to hide a div that holds the like button
    
         });
    

    the first has been breaking my balls for the last 48 hours, but I'm there now.

    (Edit: I'm very new to this myself, so take in mind my ignorance and limited understanding) What you need to know though is that a facebook user must give you permission for you to know whether he or she is fan-of/likes your page. This means you must create a FB application and link it to your page. Upon loading/liking the user will be asked for permission to share his basic information. For a simple hide of a 'like button' this seems excesive. If you're interested though, I can tell you more about this.