Facebook工具包,向用户发送消息

时间:2010-05-02 09:50:39

标签: .net facebook

我需要在用户墙或朋友墙上发送消息,我知道如何在我的墙上发布消息但是如何将消息发布到另一个用户墙?

感谢

2 个答案:

答案 0 :(得分:1)

试试这个...ñ_ñ

            try
        {
            String namePub = servicio.Users.GetInfo().first_name + "ha actualizado su estado";
            String cosa = servicio.Stream.Publish(richTextBox1.Text,
            new attachment()
            {
                name = namePub,
                href = "http://www.facebook.com/apps/application.php?id=136818146334647",
                caption = "Tú tambien puedes usar Escuchando ahora, es facil y rapido",
                properties = null,
                media = new List<attachment_media>()
                {
                    new attachment_media_image()
                    {
                        src="http://www.rammsdio.com.ar/images/img14781001.gif",
                        href = "http://www.facebook.com/apps/application.php?id=136818146334647"
                    }
                }
            },
            new List<action_link>() 
            {
                new action_link()
                {
                    text="Visita SQLeros",
                    href="http://www.sqleros.com.ar/wps"
                }
            }, stringId, 0);
            listBox1.Items.Add("Has actualizado tu estado...");
            richTextBox1.Clear();
            if (checkBox2.Checked)
                servicio.Stream.AddLike(cosa);
        }
        catch (FacebookException fb)
        {

            listBox1.Items.Add(fb.Message);
        }

答案 1 :(得分:0)

发送到另一个用户的墙 - 与发送当前用户的墙完全相同:使用Stream.publish

只需指定所需用户ID的target_id; - )