How to add share application button from activity to google+ and facebook?
<p>I am building android application now i already completed, but I want to add Share button in root activity that user can share my application(link to download from google market) to google+ , facebook, twitter and linkin.</p>

<p>How can i do it?</p>

<h1>my code:</h1>

<pre><code>ImageButton sharingButton = (ImageButton) findViewById(R.id.share);
    sharingButton.setLayoutParams(new ViewGroup.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
    sharingButton.setImageResource(R.drawable.ic_share);

sharingButton.setOnClickListener(new View.OnClickListener()
        {
            public void onClick(View v)
            { 
                shareIt();
            }
        });


private void shareIt()
{
    Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
    sharingIntent.setType("text/plain");
    String shareBody = "Here is the share content body";
    sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject Here");
    sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);
    startActivity(Intent.createChooser(sharingIntent, "Share via"));
}
</code></pre>

<p>I tried this but doesn't give me a result. Can you please help me?</p>

<p>regards, </p>
