title: Facebook post not showing
body: <p>I created a app in facebook developers site and used the appId in my app and try to post in facebook, when i logged using the same fb account in my app and posted using my facebook, it posts successfully , but when i tried  login with a different account its not posting...can any body help....</p>
  
  <pre><code>import java.util.ArrayList;
  import java.util.List;
  
  import org.json.JSONException;
  import org.json.JSONObject;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.graphics.Bitmap;
  import android.net.Uri;
  import android.os.Bundle;
  import android.util.Log;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.widget.Button;
  import android.widget.ImageView;
  import android.widget.Toast;
  
  import com.facebook.FacebookRequestError;
  import com.facebook.HttpMethod;
  import com.facebook.Request;
  import com.facebook.RequestAsyncTask;
  import com.facebook.Response;
  import com.facebook.Session;
  import com.facebook.SessionLoginBehavior;
  import com.facebook.SessionState;
  import com.suppliers.bee2buy.R;
  import com.suppliers.utils.AppPreferences;
  
  public class ShareData extends Activity {
      private Session.StatusCallback sessionStatusCallback;
      private Session currentSession;
      Button publishButton;
      AppPreferences appPref;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.sharedata);
          appPref = new AppPreferences(ShareData.this, "PREFS");
          publishButton = (Button) findViewById(R.id.publishButton);
  
          connectToFB();
  
          publishButton.setVisibility(View.VISIBLE);
  
          // create instace for sessionStatusCallback
          sessionStatusCallback = new Session.StatusCallback() {
  
              @Override
              public void call(Session session, SessionState state,
                      Exception exception) {
                  onSessionStateChange(session, state, exception);
  
              }
          };
  
          // logout button
  
          // publish button
          publishButton = (Button) findViewById(R.id.publishButton);
          publishButton.setOnClickListener(new OnClickListener() {
  
              @Override
              public void onClick(View v) {
  
                  publishStorys();
  
              }
          });
  
      }
  
      /**
       * Connects the user to facebook
       */
      public void connectToFB() {
  
          List&lt;String&gt; permissions = new ArrayList&lt;String&gt;();
          permissions.add("publish_stream");
  
  
          currentSession = new Session.Builder(this).build();
          currentSession.addCallback(sessionStatusCallback);
  
          Session.OpenRequest openRequest = new Session.OpenRequest(
                  ShareData.this);
          openRequest.setLoginBehavior(SessionLoginBehavior.SUPPRESS_SSO);
          openRequest.setRequestCode(Session.DEFAULT_AUTHORIZE_ACTIVITY_CODE);
          openRequest.setPermissions(permissions);
          currentSession.openForPublish(openRequest);
  
      }
  
      /**
       * this method is used by the facebook API
       */
      @Override
      public void onActivityResult(int requestCode, int resultCode, Intent data) {
          super.onActivityResult(requestCode, resultCode, data);
          if (currentSession != null) {
              currentSession
                      .onActivityResult(this, requestCode, resultCode, data);
          }
      }
  
      /**
       * manages the session state change. This method is called after the
       * &lt;code&gt;connectToFB&lt;/code&gt; method.
       * 
       * @param session
       * @param state
       * @param exception
       */
      private void onSessionStateChange(Session session, SessionState state,
              Exception exception) {
          if (session != currentSession) {
              return;
          }
  
          if (state.isOpened()) {
              // Log in just happened.
              Toast.makeText(getApplicationContext(), "session opened",
                      Toast.LENGTH_SHORT).show();
          } else if (state.isClosed()) {
              // Log out just happened. Update the UI.
              Toast.makeText(getApplicationContext(), "session closed",
                      Toast.LENGTH_SHORT).show();
          }
      }
  
      /**
       * Publishes story on the logged user's wall
       */
  
      private void publishStorys() {
          if (currentSession != null) {
              // this is not used
              // Bitmap icon =
              // BitmapFactory.decodeResource(getApplicationContext()
              // .getResources(), R.drawable.ic_launcher);
  
              Bundle postParams = new Bundle();
              postParams.putString("name", "Product Shared from Bee2Buy");
              postParams.putString("caption", appPref.getData("share_title"));
              // postParams
              // .putString(
              // "description",
              // "The Facebook SDK for Android makes it easier and faster to develop Facebook integrated Android apps.");
              postParams.putString(
                      "link",
                      "http://www.saznaitsols.com/site_uploads/product/"
                              + appPref.getData("share_img"));
              postParams.putString(
                      "picture",
                      "http://www.saznaitsols.com/site_uploads/product/"
                              + appPref.getData("share_img"));
  
              Request.Callback callback = new Request.Callback() {
                  public void onCompleted(Response response) {
  
                      FacebookRequestError error = response.getError();
                      if (error != null) {
                          Toast.makeText(ShareData.this.getApplicationContext(),
                                  error.getErrorMessage(), Toast.LENGTH_SHORT)
                                  .show();
                      } else {
                          // Toast.makeText(
                          // ShareData.this.getApplicationContext(),
                          // postId, Toast.LENGTH_LONG).show();
                      }
                  }
              };
  
              Request request = new Request(currentSession, "me/feed",
                      postParams, HttpMethod.POST, callback);
  
              RequestAsyncTask task = new RequestAsyncTask(request);
              task.execute();
              Toast.makeText(ShareData.this, "Posted on fb", Toast.LENGTH_SHORT).show();
              ShareData.this.finish();
  
  
          } else {
              Toast.makeText(getApplicationContext(), "Error", Toast.LENGTH_LONG)
                      .show();
          }
  
      }
  
  }
  </code></pre>