0
我已經搜索並通過了許多所謂的解決方案,但沒有任何幫助。 我有一個情況,我需要不同的li
標籤在同一頁上的多個Facebook評論。單個頁面中的多個Facebook註釋插件
該代碼將使我想清楚。
<?php foreach($events_without_upcoming as $single_events):?>
<li id="event_<?php echo $single_events->id; ?>" class="events" style="cursor:default">
<span class="sn"><?php $i++; ?></span>
<span class="date"><?php echo $new_date?></span>
<span class="venue"><?php echo $single_events->venue; ?></span>
<span class="address"><?php echo $single_events->address; ?></span>
<span class="option"><?php echo share_button('facebook', array('url'=>"http://www.xxxxxx.com", 'text'=>$text))?><?php echo share_button('twitter', array('url'=>$url, 'text'=>$text, 'via'=>'Lightning At The Opera', 'type'=>'iframe'))?></span>
<div id="fb_<?php echo $single_events->id; ?>" class="fb_plugin" style="display:none;"></div>
<div class="fb-like" style="display:block" data-href="http://www.xxxxxx.com/<?php echo $single_events->id; ?>" data-send="true" data-width="450" data-show-faces="false"></div>
<div class="fb-comments" data-href="http://www.xxxxxx.com/#event<?php echo $single_events->id;?>" data-width="470"></div>
</li>
<?php endforeach;?>
FB註釋插件位於foreach循環中。 每個li
包含評論插件。 我試着給代碼中的data-href一個唯一的url,但它不工作。 我一直在嘗試從早上,但我找不到任何東西。
如果我沒有讓自己清楚,請問任何需要的東西。
Thx提前。
我們可以擁有真實的代碼,而不是它的破損版本嗎?我可以隱約地告訴它,這是PHP。 –
sory爲模糊的代碼...我編輯它。 –