I want to share a message such as " Check out the image http://someUrl.com Shared from app ABCapp. The user must be able to choose any of the installed applications to share with. I am using the following code
Intent intent = new Intent(android.content.Intent.ACTION_SEND);
intent.setType("text/plain");
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
intent.putExtra(Intent.EXTRA_TEXT, shareMsg);
startActivity(Intent.createChooser(intent,
getString(R.string.share_using_application)));
It works fine for all other applications other than facebook. I have read some other questions which suggest to use facebook sdk. I am not very clear with what am I supposed to use fb sdk for? I want the list of applications to be shown on click of share option, after that am i supposed to take a different approach if user selects FB? Can the user's selection be detected? Please explain.
"I want the list of applications to be shown on click of share option"
You can show the list of applications in spinner view if its limited i.e. email,twitter,facebook. – Cleome