从iPhone发布到Facebook时,在JSON中使用换行符序列

|| 我正在开发一个将餐厅信息发布到用户的Facebook墙上的应用程序。一切工作正常,除非我不知道如何在JSON代码的\“ description \”部分中插入新行。我的相关代码如下:
FBStreamDialog* dialog = [[[FBStreamDialog alloc] init] autorelease];
dialog.userMessagePrompt = @\"Enter your message:\";
dialog.attachment = [NSString stringWithFormat:@\"{\\\"name\\\":\\\"Check out this great restaurant!\\\",\\\"href\\\":\\\"/\\\",\\\"caption\\\":\\\"%@\\\",\\\"description\\\":\\\"%@ /*NEW LINE HERE*/%@, %@ /*NEW LINE HERE*/%@\\\",\\\"media\\\":[{\\\"type\\\":\\\"image\\\",\\\"src\\\":\\\"http://www.myhost.ca/images/image_IC_B_03.png\\\",\\\"href\\\":\\\"http://www.myhost.com/\\\"}]}\",
                     restaurantObj.name, restaurantObj.address, restaurantObj.city, restaurantObj.provinceState, restaurantObj.phoneNumber];
dialog.actionLinks = @\"[{\\\"text\\\":\\\"Download this app!\\\",\\\"href\\\":\\\"http://www.myhost.com/\\\"}]\";

[dialog show];
我尝试插入\\ n,并且尝试在上面标记的位置插入\\ r,但是不幸的是,这不起作用。有人对此有解决方案吗?
已邀请:
您可能可以使用此人发现的相同解决方法: facebook c#sdk:添加/编辑带有换行符的事件

要回复问题请先登录注册