问题
I am using facebook C# SDK 5.3.2 for desktop application and i created desktop app using this sdk. I can now post messages but i also like and share posted messages. It seems that i should get postid and then post messages with parameter "/me/likes" along with postid. But i couln't manage it till now.
回答1:
for the graph to like a post (see https://developers.facebook.com/docs/reference/api/post/), all you need to do is HTTP post to {post ID}/likes
without any parameters. This assumes the user has publish_stream
permissions accepted. :)
回答2:
I think you can do:
var fb = new FacebookClient(accessToken);
IDictionary<string, object> para = new Dictionary<string, object>();
fb.PostAsync("/" + fbphotoid + "/likes", para);
Because PostAsync need one parameter.
来源:https://stackoverflow.com/questions/8590364/how-do-i-implement-like-feature-with-facebook-c-sharp-sdk