从后面的代码向墙发布消息

时间:2011-11-28 12:10:46

标签: c# facebook-graph-api

我正在尝试发布代码背后的评论。有没有办法做到这一点? 我可以通过

获取用户个人资料照片

http://graph.facebook.com/“+ fbId +”/ picture;

我可以用类似的方式张贴到墙上吗?

Thnaks

1 个答案:

答案 0 :(得分:1)

使用Facebook自定义应用程序和Facebook SDK

            var facebookClient = new FacebookClient(FbConf.testimonialsAppId, FbConf.testimonialsAppSecret);

            IDictionary<string, string> parameters = new Dictionary<string, string>();

            parameters.Add("message","message on the wall"));
            parameters.Add("created_time", DateTime.Now.ToString());

            dynamic result = facebookClient.Post(string.Format("{0}/feed", FbConf.testimonialsAppId), parameters);
            var id = result.id;