开发者

Facebook share via iframe

I have a couple of share buttons as regular links to http:开发者_JAVA技巧//www.facebook.com/sharer.php?s=100&p[url]=https://stackoverflow.com/questions/ask (as an example). I know, it is an old method, but it works fine.

But how can I open such links in iframe (not in new window) with lightbox, fancybox etc? I have just tested this way, but it doesnt work propretly.


If you're asking to change the page inside an iframe then you can use:

<iframe id="fb"></iframe>

page = "http://www.facebook.com/sharer.php?etc";
document.getElementById('fb').src = page;

That's a simplistic example.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜