全景漫游如何分享到微博,人人,QQ上
全景漫游的分享主要通過javascript代碼實現(xiàn),通過給組件添加一個執(zhí)行腳本的動作,在腳本中(js代碼)添加一定的代碼達到分享的目的。具體的代碼如下:
新浪微博:window.open("http://v.t.sina.com.cn/share/share.php?url="+encodeURIComponent(location.href));
騰訊微博:window.open("http://share.v.t.qq.com/index.php?c=share&a=index&url="+encodeURIComponent(location.href));
QQ空間:window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+encodeURIComponent(document.location.href));
人人網(wǎng):window.open("http://share.renren.com/share/buttonshare.do?link="+encodeURIComponent(location.href));