我正在开发一个应用程序。在其中,我显示所有默认共享选项,例如Bluetooth, E-Mail, Drive, Facebook, Twitter, Yahoo, FreeSMS
. 我在All except Facebook
. 如何在 Facebook 墙上设置默认文本。请帮我解决这个问题。
我的代码如下:
public class MainActivity extends Activity implements OnClickListener {
private Button btn_share;
// private Dialog mdialog = null;
private String TAG = "This Message is from HardenUp.Thank You.";
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_main);
getInit();
}
private void getInit() {
btn_share = (Button) findViewById(R.id.btn_share);
btn_share.setOnClickListener(this);
}
public void onClick(View v) {
if (v == btn_share) {
// showDialog();
Intent sharingIntent = new Intent(
android.content.Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
sharingIntent.putExtra(Intent.EXTRA_TEXT, TAG);
sharingIntent.putExtra(Intent.EXTRA_SUBJECT, "HardenUp");
startActivity(Intent.createChooser(sharingIntent, "Share Using"));
}
}
}