title: Facebook error : application ID is invalid
body: <p>Hey i get this error using the SDK though the app ID is correct.</p>
  
  <p>Now when i try to authorize the app, it works fine and authorizes it, but when i try and make requests, facebook returns this error. My app is initlized properly and is not in sandbox mode.</p>
  
  <p>I found <strong>No</strong> info about this problem, does someone know what can cause this?</p>
  
  <p>I'm trying to upload photo using The following code :</p>
  
  <pre><code>    byte[] data = null; 
  
  Bitmap bi = BitmapFactory.decodeFile(photoToPost); 
  ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
  bi.compress(Bitmap.CompressFormat.JPEG, 100, baos); 
  data = baos.toByteArray(); 
  
  Bundle params = new Bundle(); 
  params.putString("method", "photos.upload"); 
  params.putByteArray("picture", data); 
  
  AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(facebook); 
  mAsyncRunner.request(null, params, "POST", new SampleUploadListener(), null); 
  </code></pre>
  
  <p>SampleUploadListener :</p>
  
  <pre><code>    public class SampleUploadListener extends BaseRequestListener { 
  
      public void onComplete(final String response, final Object state) { 
          try { 
              // process the response here: (executed in background thread) 
              Log.d("Facebook-Example", "Response: " + response.toString()); 
              JSONObject json = Util.parseJson(response); 
              final String src = json.getString("src"); 
  
              // then post the processed result back to the UI thread 
              // if we do not do this, an runtime exception will be generated 
              // e.g. "CalledFromWrongThreadException: Only the original 
              // thread that created a view hierarchy can touch its views." 
  
          } catch (JSONException e) { 
              Log.w("Facebook-Example", "JSON Error in response"); 
          } catch (FacebookError e) { 
              Log.w("Facebook-Example", "Facebook Error: " + e.getMessage()); 
          } 
      } 
  
      @Override 
      public void onFacebookError(FacebookError e, Object state) { 
          // TODO Auto-generated method stub 
  
      } 
  } 
  </code></pre>