1. Download our Official Android App: Forums for Android!

problem in posting a message on friends wall in facebook

Discussion in 'Android Apps & Games' started by vandit67, Jul 22, 2010.

  1. vandit67

    vandit67 Lurker
    Thread Starter
    Rank:
    None
    Points:
    25
    Posts:
    2
    Joined:
    Jul 16, 2010

    Jul 16, 2010
    2
    0
    25
    hello

    i have a problem in posting a message on friends wall in facebook.i write below code for posting a message.

    private void postwall(){
    try {
    FBRequest streamRequest = FBRequest.requestWithDelegate(new
    FBRequestDelegateImpl());
    Map<String, String> parameters = new HashMap<String, String>();

    frdlist = new String
    [list.size()];
    for(int j=0;j < list.size();j++){
    if (list.get(j).isChecked()) {
    frdlist[j]=String.valueOf(list.get(j).getUserid());
    parameters.put("message", "HI.... its a test application of Dates Near Me");
    parameters.put("attachment", "{\"name\":\"Facebook Connect for Android\",\"href\":\"http://code.google.com/p/fbconnect-android/\",\"caption\":\"Caption\",\"description\":\"Descr iption\",\"media\":[{\"type\":\"image\",\"src\":\"http://img40.yfrog.com/img40/5914/iphoneconnectbtn.jpg\",\"href\":\"http://developers.facebook.com/connect.php?tab=iphone/\"}],\"properties\":{\"anotherlink\":{\"text\":\"Faceb ook homepage\",\"href\":\"http://www.facebook.com\"}}}");
    parameters.put("auto_publish" ,"true");
    parameters.put("target_id" ,frdlist[j]);
    parameters.put("uid" ,String.valueOf(FBSession.getSession().getUid()));

    streamRequest.call("stream.publish", parameters);
    }
    }


    } catch (Exception e) {
    // TODO Auto-generated catch block
    e.printStackTrace();

    }

    }

    i am passing three values: message,target_id and uid...all values i get perfectly.but when i check my friends wall that time message is not display on wall..

    so if anybody have a solution than please suggest me

    thanx
    vandit
     

    Advertisement

  2. sitlet

    Rank:
    None
    Points:
    213
    Posts:
    5,867
    Joined:
    Apr 11, 2010

    Apr 11, 2010
    5,867
    633
    213
    It would help to have some details. What kind of phone? are you using an app or the website? does this happen all the time? Just with one friend?
     
  3. ranjitpatel

    ranjitpatel Lurker
    Rank:
    None
    Points:
    5
    Posts:
    8
    Joined:
    Dec 21, 2009

    Dec 21, 2009
    8
    0
    5
    Bundle params = new Bundle();

    String arr[]={"id 1","id 2","id 3"};

    for(int i=0;i<arr.length;i++)
    {
    params.putString("message", "hello ...");//("message", "".getBytes());
    //System.out.println("i============"+i);
    mAsyncRunner.request(arr+"/feed", params, "POST", new FriendRequestListener(), null);
    }
     

Share This Page

Loading...