Skip to content

Instantly share code, notes, and snippets.

@zhangcheng
Created June 25, 2012 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhangcheng/2990264 to your computer and use it in GitHub Desktop.
Save zhangcheng/2990264 to your computer and use it in GitHub Desktop.
WB2 fetch own's info
WB2.anyWhere (W) ->
W.widget.connectButton
id: "wb_connect_btn"
type: '3,2'
callback :
login: (o) ->
console.log o
logout: ->
console.log ''
WB2.anyWhere(function(W){
W.parseCMD("/account/get_uid.json", function(sResult, bStatus){
console.log(sResult, bStatus);
}, null, {method: 'get'});})
WB2.anyWhere(function(W){
W.parseCMD("/users/show.json", function(sResult, bStatus){
console.log(sResult, bStatus);
}, {uid: 2765476897}, {method: 'get'});})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment