Social Message PhoneGap Plugin

Social Message PhoneGap Plugin

Social Message PhoneGap Plugin

Click Innovate have released a free open source PhoneGap / Cordova Plugin to help developers integrate social messaging features into their iOS Apps.

The plugin, initially designed to work on iOS6 devices (iPhone, iPod Touch & iPad) will allow PhoneGap developers to easily send messages from their app to services like Facebook and Twitter (dependant on customisable options presented to the user).

The plugin bridges functionality between PhoneGap / Cordova’s UIWebView and the native iOS application. It is composed of a single JavaScript interface and an objective-c native implementation, which follows specific plugin interfaces that the JavaScript can call.

Once installed, the code is very easy to use. Here’s an example of sending a message that can be posted to Facebook or Twitter:

window.plugins.socialmessage.send("This is a test message", ["PostToFacebook", "PostToTwitter"]);

Current support includes sending messages to: Facebook, Twitter, Weibo, Message, Email, Print, Clipboard, Contact and the Camera Roll.

We are planning to extend this plugin to implement fallbacks for iOS < 6.

The plugin is available for free from the Click Innovate code repository.

Update 29/01/2013: We’ve now implemented the email only fallback for iOS < 6 and tested / upgraded for the latest version of Cordova at the time of writing this (Cordova 2.4.0).

Update 06/06/2013: The Social Message plugin is now available on Android and Windows Phone 8! Check the Click Innovate Cordova / PhoneGap Plugins code repository for more details.