title: Using facebook SDK Send Button Android
body: <p>I read the documentation of the facebook sdk. But i am not able to make the <strong>Send Button</strong> work. Below is the work i have done.</p>
  
  <pre><code>public class Main2Activity extends AppCompatActivity {
      private LoginButton loginButton;
      private CallbackManager callbackManager;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          FacebookSdk.sdkInitialize(getApplicationContext());
          callbackManager = CallbackManager.Factory.create();
          setContentView(R.layout.activity_main2);
          Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
          setSupportActionBar(toolbar);
          Bitmap image =  BitmapFactory.decodeResource(this.getResources(),
                  R.drawable.cos2ms);
          SharePhoto photo = new SharePhoto.Builder()
                  .setBitmap(image)
                  .build();
          ShareContent shareContent = new ShareMediaContent.Builder()
                  .addMedium(photo)
  
                  .build();
  System.out.println("Test me!!!!");
          SendButton sendButton = (SendButton)findViewById(R.id.messenger_send_button);
  
          sendButton.setShareContent(shareContent);
  
  sendButton.registerCallback(callbackManager, new FacebookCallback&lt;Sharer.Result&gt;() {
      @Override
      public void onSuccess(Sharer.Result result) {
  
      }
  
      @Override
      public void onCancel() {
  
      }
  
      @Override
      public void onError(FacebookException error) {
  
      }
  });
      }
  
  
      @Override
      protected void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
          super.onActivityResult(requestCode, resultCode, data);
          callbackManager.onActivityResult(requestCode, resultCode, data);
      }
  
  
  
  }
  </code></pre>
  
  <p>Please i want to know how to make it work as it do nothing when i press send button it do not open the messenger to send message?</p>