通过Facebook API在WallPost Facebook C#中换行 [英] Newline in WallPost Facebook C# via Facebook API
本文介绍了通过Facebook API在WallPost Facebook C#中换行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用以下代码在我的c#.net应用程序上发布facebook:
var fb = new FacebookClient(令牌);
string url = string .Format( {0} / {1},uid, 进料跨度>);
var argList = new 字典<字符串, > 跨度>();
argList [ message] = phought; // 要发布的消息
argList [ link] = VIDEOURL;
object postId = fb.Post(url,argList);
但是当我的帖子中包含换行符时,例如:
Hi
I
am
$
out
显示为:
嗨\ n \\ n \\ n \\ n \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Facebook壁,因为我没有显示html字符共享帮助解决方案
在stackoverflow.com上讨论过这个问题:
< a href =http://stackoverflow.com/questions/5583507/line-break-in-facebook-status-update-via-graph-api>请看这里 [ ^ ]
看起来这是一个知道的bug,但是facebook还没有正式评论它。
欢呼,
Marco
I am using following code to Post on facebook from my c# .net application:
var fb = new FacebookClient(token);
string url = string.Format("{0}/{1}", uid, "feed");
var argList = new Dictionary<string,>();
argList["message"] = phought; //message to be posted
argList["link"] = VIDEOURL;
object postId = fb.Post(url, argList);
But when my post contains newline character for eg:
Hi
I
am
going
out
It is displayed as:
Hi \ni \nam \ngoing\nout
I want my code to display the output as it is on the facebook wall as i have shared without showing html chars kindly help
解决方案 There was a discussion about this at stackoverflow.com:
see here[^]
Seems like it is a know bug, but facebook have not commented it officially, yet.
cheers,
Marco
这篇关于通过Facebook API在WallPost Facebook C#中换行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文