title: How can i transfer an image through facebook chat application in android?
body: <p>I am new to android. I am developing facebook chat application which has the feature of sending images to friend who is in chat list.
  I tried to do by using asmack api FileTranfer classes to send image. But, there was a problem in sending.
  Here is the code to transfer a file using asmack api.</p>
  
  <pre><code>// Create the file transfer manager
          ConnectionConfiguration config =    new ConnectionConfiguration("chat.facebook.com", 5222, "chat.facebook.com");
             config.setDebuggerEnabled(true);
            config.setSASLAuthenticationEnabled(true);
  
        FileTransferManager manager = new FileTransferManager(new XMPPConnection(config));
  
        // Create the outgoing file transfer
        OutgoingFileTransfer transfer = manager.createOutgoingFileTransfer(friend_id);
  
        // Send the file
        transfer.sendFile(new File("path of image from sd card"), "You won't believe this!");
  
  Here, throwing a NullPointerException at the FileTransferManager statement
  </code></pre>
  
  <p>Is there any method to send image,audio,video in facebook official api for android.
  Please advice me.
  Thanks in advance.</p>