Created
August 17, 2012 16:34
-
-
Save tjanczuk/3380414 to your computer and use it in GitHub Desktop.
wns example
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 channel = '{channel_url}'; | |
var currentAccessToken; | |
wns.sendToastImageAndText02( | |
channel, | |
{ | |
image1src: 'http://foobar.com/dog.jpg', | |
image1alt: 'A dog', | |
text1: 'This is a dog', | |
text2: 'The dog is nice' | |
}, | |
{ | |
client_id: '{your Package Security Identifier}', | |
client_secret: '{your Client Secret}', | |
accessToken: currentAccessToken | |
}, | |
function (error, result) { | |
currentAccessToken = error ? error.newAccessToken : result.newAccessToken; | |
}); | |
wns.sendToastText01( | |
channel, | |
{ | |
text1: 'This is a dog' | |
}, | |
{ | |
client_id: '{your Package Security Identifier}', | |
client_secret: '{your Client Secret}', | |
accessToken: currentAccessToken | |
}, | |
function (error, result) { | |
currentAccessToken = error ? error.newAccessToken : result.newAccessToken; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment