开发者

Apparently the SDK is encoding text, how to avoid?

开发者 https://www.devze.com 2023-02-28 17:03 出处:网络
I am using the SDK to post to FB wall, what happen is if I post a text like: Hello \"world\"! In the FB wall I get the following:

I am using the SDK to post to FB wall, what happen is if I post a text like:

Hello "world"!

In the FB wall I get the following:

Hello \"world\"!

Why is happening? What should I do to avoid that?

Below is a sample of the code I use, where of course the query string parameters returned by Request.Get m开发者_StackOverflow社区ay contain anything, if there's a string with " or a carriage return, etc... After the code is executed I can see on my FB wall the post with the encoded chars.

FacebookClient fbc = new FacebookClient( _accesstoken_ );

dynamic ievent = new ExpandoObject();
ievent.name = Request.Get("name");
ievent.description = Request.Get("description");
ievent.location = Request.Get("location");
ievent.privacy_type = Request.Get("privacy");

dynamic result = fbc.Post("me/events", ievent);


I found out was a bug in the C# FB SDK.

After downloading the latest release everything worked fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消