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

  • Home
  • SEARCH
  • 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 9218387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:51:09+00:00 2026-06-18T02:51:09+00:00

I am using the following code and trying to post message on facebook wall

  • 0

I am using the following code and trying to post message on facebook wall along with the picture url. Both message and picture url is empty. Can any one find out and direct me in the right direction?

btnPostToWall.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            postToWall();
        }
    });


public void postToWall() {
    Bundle params = new Bundle();

    params.putString("message","test to post");

    params.putString("url", URLEncoder.encode("http://a.espncdn.com/photo/2010/0523/pg2_a_cricket_576.jpg"));

    try {
        String response = facebook.request("me/feed", params, "POST");
    } catch (FileNotFoundException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
    } catch (MalformedURLException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
    } catch (IOException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
    }
    // post on user's wall.
    facebook.dialog(this, "feed", new DialogListener() {

        @Override
        public void onFacebookError(FacebookError e) {
        }

        @Override
        public void onError(DialogError e) {
        }

        @Override
        public void onComplete(Bundle values) {
        }

        @Override
        public void onCancel() {
        }
    });

}
  • 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-06-18T02:51:10+00:00Added an answer on June 18, 2026 at 2:51 am

    set this permission as public

    private String[] PERMISSIONS = new String[]
    
        { "publish_stream", "read_stream", "offline_access" };
    

    This will check is session exist if yes then it will direct update if not then ask user permission to update on wall.

    Button click event

        facebookConnector = new FacebookConnector(APP_ID, activity.getParent(), 
    activity.getApplicationContext(),PERMISSIONS);
        if (facebookConnector.getFacebook().isSessionValid())
        {   
             postMessageInThread(position); // see method below 
        }
        else
        {
             SessionEvents.AuthListener listener = new SessionEvents.AuthListener()
        {
    
    @Override
    public void onAuthSucceed()
    {
         postMessageInThread(position);
    }
    
    @Override
    public void onAuthFail(String error)
    {
    }
    };  
    
    SessionEvents.addAuthListener(listener);
        facebookConnector.login();
    }
    

    This will update your data on wall

    private void postMessageInThread(final int position)
        {
            Thread t = new Thread()
            {
                public void run()
                {
                    try
                    {
                        facebookConnector.postMessageOnWall(
                                "Your Text Data",
                                "Your Email URL","Description");
                        mFacebookHandler.post(mUpdateFacebookNotification);
                    } catch (Exception ex)
                    {
                        Log.e("", "Error sending msg", ex);
                    }
                }
            };
            t.start();
        }
    

    Note: : Here Position is my list record so manage your data according to that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to post an apprequest to a user using the URL: https://graph.facebook.com/USER_ID/apprequests?message=’This
I am trying to post comment on wall using following code after successful login.
I am trying to post some java code snippets on wordpress.com using the following
I'm trying to post Photo, URL, message and name to Facebook from my iOS
i'm trying to post on facebook so i'm uising the following code. It works
I am trying to post messages to facebook wall using Android's default Facebook client.
I am trying to post to my facebook page wall using curl but i
I have the following JavaScript code to publish/post a message to friend's Wall, as
Using the following code, trying to get the font color to animate on hover,
I am trying to save images using the following code: - (void)writeData{ if(cacheFileName==nil) return;

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.