Skip to content

Instantly share code, notes, and snippets.

@tjanczuk
Created August 17, 2012 16:34
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 tjanczuk/3380414 to your computer and use it in GitHub Desktop.
Save tjanczuk/3380414 to your computer and use it in GitHub Desktop.
wns example
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