title: Android Facebook sharing is opening shareDialog twice
body: <p>I'm using the Facebook ShareDialog to share links and photos, depending on the content. But I'm seeing a strange issue. When I click on the facebook icon in my shareActionProvider, it first opens the ShareDialog with a blank post. Then, when I click to go back to my application, it re-opens the ShareDialog with the link/ photo content I wanted to show.</p>
  
  <p>Here is the code I'm using to share.</p>
  
  <pre><code>....
  
  shareActionProvider.setOnShareTargetSelectedListener(new MyActionProvider.OnShareTargetSelectedListener() {
         @Override
         public boolean onShareTargetSelected(MyActionProvider source, Intent intent) {
             // Recover selected application name for custom action handling
            final String appName = intent.getComponent().getPackageName();
  
            switch (appName) {
                case "com.facebook.katana":                 // Facebook
  
                          ShareLinkContent content = new ShareLinkContent.Builder()
                                  .setContentUrl(Uri.parse("https://developers.facebook.com"))
                                  .setContentTitle("Check it out!")
                                  .build();
  
                          shareDialog.show(content);
  
                          break;
  
                 ....
            }
  </code></pre>
  
  <p>Has anyone seen this behavior before?</p>
  
  <p>Thanks!!</p>
  
  <p>I've attached both screens that I'm seeing, in order that I'm seeing them in.</p>
  
  <p><a href="http://i.stack.imgur.com/QWfEp.png" rel="nofollow">First screen</a></p>
  
  <p><a href="http://i.stack.imgur.com/jqSLw.png" rel="nofollow">Second dialog screen</a></p>
  
  <p><strong>EDIT</strong> </p>
  
  <p>I'm adding more of my code.</p>
  
  <p>I'm sharing to FB using a custom <code>ShareActionProvider</code> (which is copied exactly from the Android source code, except for me overriding the <code>setOnShareTargetSelectedListener</code>)</p>
  
  <p>In my Activity <code>onCreate</code>:</p>
  
  <pre><code>FacebookSdk.sdkInitialize(getApplicationContext());
  callbackManager = CallbackManager.Factory.create();
  shareDialog = new ShareDialog(this);
  shareDialog.registerCallback(
              callbackManager,
              shareCallback);
  </code></pre>
  
  <p>When I set up my <code>ShareActionProvider</code>:</p>
  
  <pre><code>Intent shareIntent = new Intent();
  shareIntent.setAction(Intent.ACTION_SEND);
  shareIntent.setType("text/plain");
  
  if (shareActionProvider != null) {
      shareActionProvider.setShareIntent(shareIntent);
      //... this is before the setOnShareTargetSelected call ....
  </code></pre>