Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Post your code how you are uploading image to facebook. And this is one sample code which is working fine for me just have a look might be helpful to you. And in my code am not creating any album Wall Photos. My picture gets uploaded in wall itself. Just have a look ...</p> <pre><code>private void fbImageSubmit() { if (facebook != null) { if (facebook.isSessionValid()) { try { byte[] data = null; // Bitmap bi = BitmapFactory.decodeFile(Constants.imgShare); ByteArrayOutputStream baos = new ByteArrayOutputStream(); bmScreen.compress(Bitmap.CompressFormat.JPEG, 100, baos); data = baos.toByteArray(); Bundle parameters = new Bundle(); parameters.putString("message", strmsg); parameters.putString("method", "photos.upload"); parameters.putByteArray("picture", data); facebook.request(null, parameters, "POST"); /* * time = Calendar.getInstance().getTime().getHours() + ":" * + Calendar.getInstance().getTime().getMinutes(); */ currentTime = DateFormat.format("hh:mm", d.getTime()); currentDate = DateFormat.format("dd/MM/yyyy", d.getTime()); Cursor cursor = Constants.dbHelper .GetDataFromImageName(Constants.enhancedImage .getImagename()); if (cursor.getCount() &gt; 0) { Constants.dbHelper.updateData(currentDate.toString(), currentTime.toString(), "Facebook", "Image"); } else { Constants.dbHelper.insertData("true"); } Toast.makeText(getApplicationContext(), "Image uploaded successfully.", Toast.LENGTH_LONG) .show(); } catch (Exception e) { // TODO: handle exception System.out.println(e.getMessage()); } } } } </code></pre> <p>// bmscreen is my bitmap of image ; Hope might be helpful to you.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload