检查用户是否点击了Facebook赞按钮(多个按钮)

检查用户是否点击了Facebook赞按钮(多个按钮)

问题描述:

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?

我已经为这个网站和其他几个网站寻找了一些解决方案,但我仍然看到了一些解决方案 不能将它应用到我的问题中。 p>

如果你们帮助我们,那就很高兴。 p>

我有这段代码可以像按钮一样生成facebook p> \ n

请注意 $ fb_link [$ i] strong>是Facebook粉丝页面的网址。 p>

  for($ i = 0;  $ i&lt; $ ln_arr_linkdesc; $ i ++){//输出票据
 echo'
&lt; div class =“tick_cont”&gt; 
&lt; div class =“flike_cont”&gt; 
&lt; fb:like  href =“'。$ fb_link [$ i]。'”send =“false”layout =“button_count”width =“250”show_faces =“true”font =“lucida grande”&gt;&lt; / fb:like&gt; \  n&lt; / div&gt; 
&lt; div class =“ftitle_cont”&gt;'。  $ fb_desc [$ i]。'&lt; / div&gt; 
&lt; / div&gt; 
&lt; div style =“clear:both;”&gt;&lt; / div&gt; 
'; 
} 
   pre> 
 
 

这就是它的样子。 p>

p>

我的问题是什么,我无法验证用户是否喜欢按钮,没有任何按钮 我想要的输出应该是 p>

p>

当用户点击usergamestv和Php Academy时,附加到容器 strong>下方,用户点击/喜欢 相应的页面。 p>

我已经在按钮上放了 onclick =“validate_like();” strong>,但它不起作用。 这个东西有什么解决方案吗? p> div>