0

私は1つのアプリケーションを開発しています。その中に、のようなデフォルトの共有オプションがすべて表示されています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"));
    }

}

}
4

1 に答える 1

0
public void postOnWall(String msg) {
        Log.d("Tests", "Testing graph API wall post");
         try {
                String response = mFacebook.request("me");
                Bundle parameters = new Bundle();
                //Here what you want to pass message
                parameters.putString("message", msg);
                //Here what you want to pass message
                parameters.putString("description", "test test test");
                response = mFacebook.request("me/feed", parameters, 
                        "POST");
                Log.d("Tests", "got response: " + response);
                if (response == null || response.equals("") || 
                        response.equals("false")) {
                   Log.v("Error", "Blank response");
                }
         } catch(Exception e) {
             e.printStackTrace();
         }
    }
于 2012-11-20T05:06:03.117 に答える