How to post an image to facebook timeline from android app WITHOUT SHOWING DIALOG
<p>I am working on facebook sharing module in my app, I want to post an image to my timeline(wall) from my app, but I want to do this without any dialog, I have searched lot of links which show code using deprecated methods with no luck, Can anybody help me for this? thanks in advance.</p>

<pre><code>public  void postImageonWall(String msg ) {

            String path = "me/feed";
            AccessToken at = AccessToken.getCurrentAccessToken();
            Bundle parameters = new Bundle();
        ByteArrayOutputStream stream = new ByteArrayOutputStream();
        Const.bmp_post.compress(Bitmap.CompressFormat.PNG, 100, stream);
        byte[] bytearray = stream.toByteArray();
            parameters.putByteArray("picture", bytearray);
            HttpMethod method = HttpMethod.POST;
            GraphRequest.Callback cb = new GraphRequest.Callback() {



                @Override
                public void onCompleted(GraphResponse graphResponse) {

                    //check graphResponse for success or failure
                    if(graphResponse.getError()==null){
                        Toast.makeText(NewPostActivity.this, "Successfully posted to Facebook", Toast.LENGTH_SHORT).show();
                    }
                    else{
                        Toast.makeText(NewPostActivity.this, "Facebook: There was an error, Please Try Again", Toast.LENGTH_SHORT).show();

                    }
                }
            };

            GraphRequest request = new GraphRequest(at,path,parameters,method,cb);
            request.setParameters(parameters);
            request.executeAsync();
            // TODO Auto-generated catch block
            ;




    }
</code></pre>