-
-
Save ricardoalcocer/d8ee94cda1e463a319ba to your computer and use it in GitHub Desktop.
Cross-platform Facebook and Twitter social sharing
This file contains 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
//must have TiSocial module installed for iOS: https://github.com/viezel/TiSocial.Framework | |
//share() Android -- uses intent, iOS --- uses TiSocial share dialog | |
//tweet iOS Only -- uses TiSocial tweet dialog | |
function onClickShare(){ | |
require('socialmod').share({ | |
text: 'text to share', | |
title: 'Title', | |
url: 'http://example.com' | |
}); | |
} | |
function onClickTweet(){ | |
//iOS only. | |
require('socialmod').tweet({ | |
text:'tweet message', | |
image:'image.png', | |
url: 'http://example.com' | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment