Easy? Question - Publish a Message for a User

Nov 11, 2009 at 2:09 AM

Hello,

I have a user id for a facebook user. My question is, how to I publish a message to this user's Facebook stream?  Currently, I have the following code:

ConnectSession session = new ConnectSession(ApplicationKey, SecretKey);
if (session.IsConnected())
{
  Api facebook = new Api(session);
  Facebook.Schema.user user = facebook.Users.GetInfo(userID);

  facebook.Stream.Publish("Hello");
}

Does this code post a message on a Facebook user's stream? If so, how? If not, how do I post a message on a Facebook user's stream?

Thank you!

 

Nov 12, 2009 at 9:13 PM

// Add comment to existing post

facebook.stream.addComment(postID, comment);

 

// Create new wall post

return facebook.status.set(newStatus);