Brian Coolidge
Brian Coolidge

Reputation: 4649

Checks if the User clicked the Facebook Like Button (Multiple Button)

I've looked for some solutions to this site and couple of other sites, still I saw some solutions yet I can't be able to apply it into my problem.

So would be glad if you help me guys.

I have this piece of code that generates facebook like button

Take note that $fb_link[$i] is the URL of the facebook fan page.

  for ($i = 0; $i < $ln_arr_linkdesc; $i++) { //Output Tickets
  echo '
    <div class="tick_cont">
      <div class="flike_cont">
        <fb:like href="'. $fb_link[$i] .'" send="false" layout="button_count" width="250" show_faces="true" font="lucida grande"></fb:like>
      </div>
      <div class="ftitle_cont">'. $fb_desc[$i] .'</div>
    </div>
    <div style="clear:both;"></div>
  ';
  }

And this what it is looked like.

enter image description here

What my problem is, I can't validate if the user has liked the button(s), don't have any clue for it.

My Desire output should be

enter image description here

When the user clicked the usergamestv and Php Academy it appends to the container below that the user clicked/liked the corresponding page.

I already put onclick="validate_like();" on button though, it doesn't work. Any solution for this stuff?

Upvotes: 0

Views: 484

Answers (1)

Related Questions