Here is the real code of my BBC News Android app that does this. It shares the URL on the page. If the user has the Facebook or Twitter applications installed, they will be given the opportunity to share these services, as well as with email, etc.
final Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_TEXT, pageUrl); try { startActivity(Intent.createChooser(intent, "Select an action")); } catch (android.content.ActivityNotFoundException ex) {
source share