SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Dec 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Facebook Like Button Removal

    Hi everyone!

    I'm building my first site and was wondering if you guys could help me out. What I'm trying to do is have a facebook like button on my site, and I'd like it to disappear or hide from my site after a user clicks it.

    I'm really hoping someone here can help point me in the right direction.

    Below is the facebook button code.

    Code:
    <iframe class="fb_foot" src="http://www.facebook.com/plugins/like.php?href=http%3A%1F%2Fxyxyxy.com&amp;layout=button_count&amp;show_faces=false&amp;width=60&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true">
    </iframe>

  2. #2
    Under Construction silver trophybronze trophy AussieJohn's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    776
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    You can use the FB JavaScript API to subscribe to events.

    http://developers.facebook.com/docs/...vent.subscribe

    I'm not 100% sure on this, but you might need to use the XFBML code to get it to work (TBH, the XFBML + OpenGraph + JS API's are much nicer to work with than the iframes)

    e.g.:
    Code:
    <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
    <fb:like href="http://example.com" show_faces="true" width="200"></fb:like>
    (http://developers.facebook.com/docs/...e/plugins/like)
    var details = {
    . . web: "afterlight.com.au",
    . . photos: "jvdl.id.au",
    . . psa: "usethelatestversion.com"
    }


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •