Custom menu on Sharekit
var dialog = Ti.UI.createOptionsDialog({ | |
title: "Share", | |
options: ['Twitter', 'Facebook', 'Mail', 'Cancel'], | |
cancel: 3 // index of cancel option | |
}); | |
dialog.addEventListener('click', function(e) { | |
if(e.index == e.cancel) { return; } | |
var sharer = null; | |
switch(e.index) { | |
case 0: | |
sharer = 'Twitter' | |
break; | |
case 1: | |
sharer = 'Facebook' | |
break; | |
case 2: | |
sharer = 'Mail' | |
break; | |
} | |
sharekit.share({ | |
title: 'Title', | |
text: 'Text', | |
sharer: sharer, // here it is :) | |
view: view // always specifiy the view that originated the share event | |
}); | |
}); | |
dialog.show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
the list of sharers names are inside the documentation/ folder