I am using Facebook C# SDK to login to my website. Login works correctly but what I want is to post my app's open graph actions to logged in user's timeline. I used this code but it only posts textual status on users wall. Please tell me how should I post some specific actions

FacebookApp fbApp = new FacebookApp();
FacebookApp app = new FacebookApp(fbApp.Session.AccessToken);
var args = new Dictionary<string, object>();
args["message"] = "abc";
args["caption"] = "This is caption!";
args["description"] = "This is description!";
args["name"] = "This is name!";
args["picture"] = "[your image URL]";
args["link"] = "[your link URL]";

app.Api("/me/feed", args, HttpMethod.Post);

An example of what I want is http://www.wrangle.in/login.aspx

有帮助吗?

解决方案

I used this code but it only posts textual status on users wall.

Of course, because you are posting to /me/feed.

How to published actions, is described here: https://developers.facebook.com/docs/opengraph/actions/#create

Edit: To do so from within your C# project, just make the API call with the method you are using right now – but to the right endpoint, and with the right parameters.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top