Created
December 1, 2012 00:26
-
-
Save samma835/4179745 to your computer and use it in GitHub Desktop.
微信恶俗关注
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var addWxContact = function(wxid, cb) | |
{ | |
if (typeof WeixinJSBridge == 'undefined') return false; | |
WeixinJSBridge.invoke('addContact', { | |
webtype: '1', | |
username: wxid | |
}, function(d) { | |
// 返回d.err_msg取值,d还有一个属性是err_desc | |
// add_contact:cancel 用户取消 | |
// add_contact:fail 关注失败 | |
// add_contact:ok 关注成功 | |
// add_contact:added 已经关注 | |
WeixinJSBridge.log(d.err_msg); | |
cb && cb(d.err_msg); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这个已经不能使用了吧