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
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