开发者

Facebook share via iframe

开发者 https://www.devze.com 2023-02-23 01:14 出处:网络
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 me

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

精彩评论

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