StatusShout example MIDlet allows you to share content to Facebook using OAuth 2.0 or to a number of popular social networks using Share API.
You can choose to share either a photo (image from the phone's file system) or a message (text). To select a photo, tap the image placeholder above the text box. A photo browser (provided by the FileSelect API) opens for you to select an image from the phone. To discard the photo, tap the icon button (close) on the top-right corner of the image. To compose a message, tap the text box. A virtual keyboard opens for you to type the text. Press the Back key to hide the keyboard.
Share content to Facebook using OAuth 2.0:
Figure: Sharing content to Facebook using OAuth 2.0
Select a photo or type a message and then tap the left icon button (Facebook) on the CategoryBar.
If you have not yet been authenticated, the browser launches the Facebook website for you to enter your login credentials.
If the login is successful, the content is shared to Facebook and appears on the timeline.
You need to first obtain a Facebook application ID before the content can be shared. For more information, see https://developers.facebook.com/. If the login to Facebook is successful, then the access token is stored and used for future authentications (when sharing content to Facebook).
Share content to a social network using Share API (within the app):
Figure: Sharing photo to Twitter using Share API from StatusShout
Select a photo or type a message and then tap the right icon button (Share) on the CategoryBar.
Select an account to share the content (in the UI provided by the Share API).
If you are using the selected account for the first time, you need to enter your login credentials.
If the login is successful, the content is shared to the selected account.
you can share either a photo or a message, but not both at the same time. If you try to share both the photo and the message, then only the photo is shared and the message is discarded.
Share content using Share API with invocation:
Figure: Sharing photo from Gallery to Facebook using Share API with invocation
Open an app, which implements image sharing using Share API. For example, Gallery app.
Long press on the selected photo and tap Share.
Tap Status Shout! to launch the MIDlet.
Follow the steps in Share content to Facebook using OAuth 2.0 above to share the selected photo to Facebook.
For information about implementing the MIDlet, see Implementation.