Phonegap 3.x Twitter and Facebook sharing system
To install this plugin simply use:
cordova plugin add https://github.com/torre76/cordova-twitter-facebook-share-plugin
or, if you use Phonegap:
phonegap local plugin add https://github.com/torre76/cordova-twitter-facebook-share-plugin
Once installed, available function are:
isFBAvailable(callback) // Check if Facebook iOS share is available. Callback function receive a boolean
isTwitterAvailable(callback) // Check if Twitter iOS share is available. Callback function receive a boolean
shareWithFB (message, url, image, callback) // Share a message with FB (url, image and callback are optionals) and receive a boolean in callback (true if share is complete succesfully)
shareWithTwitter (message, url, image, callback) // Share a message with Twitter (url, image and callback are optionals) and receive a boolean in callback (true if share is complete succesfully)
All this function are available under
window.plugins.GATwitterFacebookShare
Since this plugin uses features that are available only on iOS, it is meant to be used on Apple only.