I'm coding a game and I'm using internationalisation. I want to share the score with the Facebook module. My code:
if(fb.getCanPresentShareDialog()) {
fb.presentShareDialog({
link: 'https://www.facebook.com/profile.php?id=100010324151821',
name: 'Memory Speed',
description:String.format(L('share'), Ti.App.score),
caption:L('caption_partage_score_facebook'),
});
} else {
fb.presentWebShareDialog({
link: 'https://www.facebook.com/profile.php?id=100010324151821',
name: 'Memory Speed',
description:String.format(L('share'), Ti.App.score),
caption:L('caption_partage_score_facebook'),
});
}.
'share'
: link to my strings.xml file
Ti.App.score
: var with the score
When I click on the share button, the app closes itself.
I tried to replace Ti.App.score
with a string like 'hello'
and the app doesn't crash.
Does anyone know the reason for this behavior?