final Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"[email protected]"}); intent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Sharing a favorite!"); intent.putExtra(android.content.Intent.EXTRA_TEXT, strInfo); startActivity(Intent.createChooser(intent, "Share via ..."));
I used ACTION_SEND Intent as shown above. It works with others, such as Gmail, but fail to work at facebook. Can anyone show me how to overcome this problem? Integrating facebook SDK to app project can post the text strings to the wall. But using intent can only share urls. Eg. www.google.com test string. If do like this intent.putExtra(android.content.Intent.EXTRA_TEXT, “www.google.com test string”); it will cut out url and only post that url to wall. How should I solve? Pls help me. I want to use intent to post text strings to wall, not urls. Thanks.
I assume it is not a bug, but it may be a Facebook’s restriction. Therefore I tried to solve it by integrating Facebook’s SDK to project. Now I can post to Facebook wall. Thanks indeed for your help.