Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid: How to post the message with the image post on facebook?
    primarykey
    data
    text
    <p>In My Appplication i am using this code to post the photo on the Facebook.</p> <p>Code:</p> <pre><code> // For Facebook =================================== Button facebookButton = (Button) saveButtonDialog.findViewById(R.id.facebook); facebookButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { saveButtonDialog.dismiss(); saveImageFunction(); // to save the Image facebook.authorize(TWSBIDrawMainActivity.this, new String[]{ "user_photos,publish_checkins,publish_actions,publish_stream"},new DialogListener() { @Override public void onComplete(Bundle values) { postImageonWall(); Toast.makeText(getApplicationContext(), "Image Posted on Facebook.", Toast.LENGTH_SHORT).show(); } @Override public void onFacebookError(FacebookError error) { } @Override public void onError(DialogError e) { } @Override public void onCancel() { } }); } }); public void postImageonWall() { byte[] data = null; Bitmap bi = BitmapFactory.decodeFile(APP_FILE_PATH + "/"+filename+".jpg"); //Bitmap bi = BitmapFactory.decodeResource(getResources(), R.drawable.icon); ByteArrayOutputStream baos = new ByteArrayOutputStream(); bi.compress(Bitmap.CompressFormat.JPEG, 100, baos); data = baos.toByteArray(); Bundle params = new Bundle(); params.putString(Facebook.TOKEN, facebook.getAccessToken()); 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>Now I am able to post the Photo with this code. But now i want to post the message with this photo post. So what else i have to do ?</p> <p>Please help me regarding this. Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

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