[英]publishing a post to your Facebook app's wall using C#
I'm trying to write a script that will publish posts to my Facebook application's wall. 我正在尝试编写一个脚本,将帖子发布到我的Facebook应用程序的墙上。 I can do a simple status update, but when I try to move to a post with a link, image, and description the formatting gets messed up. 我可以做一个简单的状态更新,但是当我尝试移动到带有链接,图像和描述的帖子时,格式就混乱了。
dynamic parameters = new ExpandoObject();
//define parameters of the post
parameters.message = flyer.Description;
parameters.link = flyer.Link;
parameters.picture = webDomain + "/Resource/" + flyer.FileName;
parameters.name = flyer.Title;
parameters.caption = "this is a caption";
parameters.description = "this is a description";
//make the post
var result = (IDictionary<string, object>)fb.Post("/" + APPID + "/feed",parameters);
The picture doesn't display. 图片不显示。 It is just a gray line on the left side, where the image should be. 它只是图像应在左侧的灰线。 The title displays correctly, but instead of being a link to the article, it's a link to the image. 标题可以正确显示,但是它不是图像的链接,而是图像的链接。 the caption, message, and description all show up correctly. 标题,消息和说明均正确显示。
figured it out. 弄清楚了。 that works fine. 效果很好。 the problem was that I was testing on localhost. 问题是我正在本地主机上进行测试。 when I switched the links to the dev site it worked fine. 当我将链接切换到开发站点时,它运行良好。 The above code works fine. 上面的代码工作正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.