Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4610514
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:08:31+00:00 2026-05-22T01:08:31+00:00

I want to upload an image to my friend’s account/wall using Facebook Api Through

  • 0

I want to upload an image to my friend’s account/wall using Facebook Api Through My application in android.
I am able to upload the image to my account, but now I am trying to make it more functional and trying to upload the image on friend’s wall/accounts which I am selecting through my Android Application.
I have tried to do it but no success.
Plz help me…
Thanks in Advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:08:32+00:00Added an answer on May 22, 2026 at 1:08 am

    Use this code in your method

    File file=new File(murl);
    InputStream is;
    try {
        is = new FileInputStream(file);
        Drawable d;
        long length = file.length();
        if (length > Integer.MAX_VALUE) {
            // File is too large
        }
        byte[] bytes = new byte[(int)length];
        ByteArrayOutputStream bout=new    ByteArrayOutputStream();
        // Read in the bytes
        int offset = 0;
        int numRead = 0;
        while (offset < bytes.length
               && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
            offset += numRead;       
        }
        bout.write(bytes);
        bout.flush();
        //Bitmap bm=BitmapFactory.decodeByteArray(bytes,0,bytes.length);
        //d=new BitmapDrawable(bm);
        //mPostButton.setBackgroundDrawable(d);
        //p.putString("to","1300750213");
        //p.putString("caption","my card");
        EditText title_txt=(EditText) findViewById(R.id.fb_upload_txt);
    
        for(int i =0;i<frnd_list_id.length/2;i++){
            if(frnd_list_id[i]!="0"){
                Bundle p=new Bundle();
                p.putString("method","photos.upload");
                p.putString("caption",title_txt.getEditableText().toString());
                p.putByteArray("picture",bytes);
                System.out.println(frnd_list_id[i].trim());
                p.putString("target_id",frnd_list_id[i].trim());
                mAsyncRunner.request(null,p,"POST",new WallPostRequestListener(),null);
            }
        }
    //System.out.println("hi");
    } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to upload image to facebook album using facebook api, i search alot
I want to upload an image file into mysql database on Android Mobile Programming,
I want to upload image file into couchdb using javascript. For this i am
I want to create an application where I want to upload image from the
I want to upload an image to my twitter profile using objective-c. I saw
Strange trouble I want to upload image via ajax which many plugin does but
I want to upload an image using a groovy on grails. My gsp page
I want to upload the image using the .NET webservices and that will be
I want to upload one image to the database by using Google app engine
I want to validate Image Resolution before upload an image in PHP through Javascript.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.