1. Introducing Channels - a new way to chat with other Android users!
    Dismiss Notice

problem in posting a message on friends wall in facebook


Last Updated:

  1. vandit67

    vandit67 New Member This Topic's Starter

    Joined:
    Jul 16, 2010
    Messages:
    2
    Likes Received:
    0
    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

    sitlet Banned

    Joined:
    Apr 11, 2010
    Messages:
    5,867
    Likes Received:
    633
    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 Member

    Joined:
    Dec 21, 2009
    Messages:
    8
    Likes Received:
    0
    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...