调用微博分享链接,会跳转到微博登录页面。登录时候手机浏览器一直提示url格式错误。当刷新登录页面后,登录就能成功登录。PC浏览器正常能登录。
分享相关代码
//新浪微博
$('a.share-xl-weiBo').on('click', function () {
var _shareUrl = 'http://v.t.sina.com.cn/share/share.php?'; //真实的appkey,必选参数
_shareUrl += '&url=' + encodeURIComponent(_url || document.location); //参数url设置分享的内容链接|默认当前页location,可选参数
_shareUrl += '&title=' + encodeURIComponent(_title || document.title); //参数title设置分享的标题|默认当前页标题,可选参数
_shareUrl += '&searchPic=false&source=' + encodeURIComponent(_source || '');
_shareUrl += '&sourceUrl=' + encodeURIComponent(_sourceUrl || '');
_shareUrl += '&content=' + 'utf-8'; //参数content设置页面编码gb2312|utf-8,可选参数
_shareUrl += '&pic=' + encodeURIComponent(_pic || ''); //参数pic设置图片链接|默认为空,可选参数
var open = window.open(_shareUrl, '_blank', 'width=' + _width + ',height=' + _height + ',top=' + _top + ',left=' + _left + ',toolbar=no,menubar=no,scrollbars=no, resizable=1,location=no,status=0');
});