给qq上的应用加上分享
给qq上的应用加上分享:
function inviteFriend() {
fusion2.dialog.invite({msg :"邀请你来玩~", onSuccess : function () {share();}, onCancel : function () {share();},onClose : function () {share();}});
}
function share(){
fusion2.dialog.share({desc:'用财富赢家江恩理论学习看盘!!', title:'财富赢家江恩理论', summary:'用财富赢家江恩理论学习看盘,提前预判大盘、个股趋势,及时把握机构参与个股;期货、外汇分析操作策略用财富赢家网江恩理论学习看盘,提前预判大盘、个股趋势,及时把握机构参与个股;期货、外汇分析操作策略',pics:'http://flow.opensns.qq.com/tfs/show.php?appid=100632810&uuid=6477551efa82324bd4bd90a28a64c19d'});
}
/*注意:pics:'http://flow.opensns.qq.com/tfs/show.php?appid=100632810&uuid=6477551efa82324bd4bd90a28a64c19d'——这段是加上分享图标 在qq上的图片地址。*/
function addCookie(objName,objValue,objHours){//添加cookie
var str = objName + "=" + escape(objValue);
if(objHours > 0){//为0时不设定过期时间,浏览器关闭时cookie自动消失
var date = new Date();
var ms = objHours*3600*1000;
date.setTime(date.getTime() + ms);
str += "; expires=" + date.toGMTString();
}
document.cookie = str;
//alert("添加cookie成功");
}
function getCookie(objName){//获取指定名称的cookie的值
var arrStr = document.cookie.split("; ");
for(var i = 0;i < arrStr.length;i ++){
var temp = arrStr[i].split("=");
if(temp[0] == objName) return unescape(temp[1]);
}
}
if(!getCookie('qq_gng')) {
inviteFriend();
addCookie('qq_gng',1,0);
}