分享内容到新浪微博|腾讯微博|qq空间
(-10-29 14:05:30)
标签:
内容
分享
微博
空间
分类:
php
function forward_sinaweibo(title) { var title = encodeURI(title);
var _t = encodeURI(document.title); var _url =
encodeURIComponent(document.location);//获取当前页面url var _assname =
encodeURI('name'); var _appkey = encodeURI('appkey'); var _pic =
encodeURI(''); var _site = ''; var _u =
'http://v./share/share.php?url=' + _url +
'&appkey=' + _appkey + '&site=' + _site + '&pic=' +
_pic + '&title=' + title + '&assname=' + _assname;
window.open(_u, '', 'width=700, height=680, top=0, left=0,
toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no,
status=no'); } function forward_tencentweibo(title) { var title =
encodeURI(title); var _t = encodeURI(document.title); var _url =
encodeURIComponent(document.location); var _assname =
encodeURI('name'); var _appkey = encodeURI('appkey'); var _pic =
encodeURI(''); var _site = ''; var _u =
'http://v./share/share.php?url=' + _url + '&appkey=' +
_appkey + '&site=' + _site + '&pic=' + _pic + '&title='
+ title + '&assname=' + _assname; window.open(_u, '',
'width=700, height=680, top=0, left=0, toolbar=no, menubar=no,
scrollbars=no, location=yes, resizable=no, status=no'); } function
forward_tencentqzone(title){ var p = { url:location.href,
showcount:'1', desc:'测试内容', summary:'', title:'测试内容标题', site:'',
pics:'', style:'203', width:98, height:22 }; var s = []; for(var i
in p){ s.push(i + '=' + encodeURIComponent(p[i]||'')); } var _u =
'http://sns./cgi-bin/qzshare/cgi_qzshare_onekey?'+s.join('&');
window.open(_u, '', 'width=700, height=680, top=0, left=0,
toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no,
status=no'); }
qq互联平台地址:/
新浪微博分享地址:/widget/publisher.php
提醒:分享到qq空间博客的时候不能使用localhost的方式,可以配置一个虚拟域名,貌似会屏蔽localhost的方式,到时分享不了
分享:
喜欢
0
赠金笔
加载中,请稍候......
评论加载中,请稍候...
发评论
登录名: 密码: 找回密码 注册记住登录状态
昵称:
评论并转载此博文
发评论
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。