android - Image Share on Facebook using Facebook SDK -


I'm following the tutorial. I only want to share the picture when you select the image from the gallery but I'm getting the Null Pointer exception error. I have a suggestion how I can solve it Thanks.

My image sharing code

My error

It needs to be converted to a byte array and then in your bundle, you have to pass a byte array like this.

  bundle postpay = new bundle (); Bitmap BMP = "your bitmap"; Bytereon output stream stream = new byteOutStream (); BMP. Commerce (bitmap.compress format.png, 100, stream); Byte [] Biteire = Stream. To Batere (); Postperm. InputBitare ("Images", Bitarere);  

Eventually you need to set it

  request request = new request (session, "m / photo", postparamas, Callback);  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -