开发者

Like box on external webpage article & Facebook page

I want to set up a like box for my client on his website (wordpress/joomla) that works as follows: If Facebook user likes the article it displays so in Facebook (thi开发者_运维知识库s part I got right) but it also states so on my clients Facebook page.

Is this possible?


To do this, you will need to set the link to the facebook page.

    <iframe src="http://www.facebook.com/plugins/like.php?href=YOUR_URL"
    scrolling="no" frameborder="0"
    style="border:none; width:450px; height:80px"></iframe>

here, paste the url of your facebook page at place of YOUR_URL not the link of your website.

or if you want that when user clicks a single like button, he should be able to link both your facebook page and website, you will need to use javascript. set 2 iframes, one with the link of your facebook page and another with your webpage link. set 1 one them hidden with css and then set a click event so that when user clicks one like, the other like should also be clicked. All the best.

    <iframe src="http://www.facebook.com/plugins/like.php?href=YOUR_FACEBOOK_PAGE"
    scrolling="no" frameborder="0"
    style="border:none; width:450px; height:80px;"></iframe>
    <iframe src="http://www.facebook.com/plugins/like.php?href=YOUR_WEBPAGE"
    scrolling="no" frameborder="0"
    style="border:none; visibility:hidden;"></iframe>

if you use jquery, u can use this code along with the above code.

$(document).ready(function(){
$(".connect_widget_like_button").click(function(){
$(".connect_widget_like_button").click();
});
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜