问题
As i am using HTML based phonegap framework, i need a plugin to implement this. when i searched over google, i got two revelent searches.
http://tech.sarathdr.com/featured/android-phonegap-plugin-for-social-share-email-facebook-twitter-and-sms
a. In the above twitter functionality is not implemented.
b. There is a typo in the above facebook share code window.plugins.SendSms.social ----> (should be)window.plugins.ShareSocial.social
c. As it is developed for phonegap 1.9, it has some deprecated methods to be used in the version phonegap 2.1.0,
ctx.startActivity() ----> cordova.getActivity().startActivity() this.ctx.startActivityForResult ----> this.cordova.startActivityForResult com.phonegap ----> org.apache.cordova
I have done all the above updates, now all my errors are gone but still nothing is happening when i click on the buttons email, sms, facebook( i correctly implemented the javascript click events for these buttons)
Can anyone who knows java,phonegap plugin dev and javascript, Please implement the same plugin for 2.1.0 post sample code to show how it is working.I need it badly ASAP.
https://github.com/phonegap/phonegap-plugins/tree/master/Android/Share
There is no single example on how to use this plugin for my purpose. Even the official documentation is not helpfull.
回答1:
I have updated the same plugin for Cordova 2 Could you please try that and let me know if you still have the issue. http://tech.sarathdr.com/featured/social-share-plugin-for-android-cordova-2-2-0-email-sms-facebook-twitter-share
回答2:
Really a cool and usefull plugin! I had to make just two edit to make it work... First: change window.plugins.ShareSocial.sms in window.SocialShare.sms (for all the sharer)
Second: change SocialShare.prototype.sms in SocialShare.sms in social.js file
Now i have a question: can you give me any suggestion to add a share to twitter method?
来源:https://stackoverflow.com/questions/13218709/how-to-implement-facebook-send-twitter-share-send-sms-send-email-in-my-phoneg