Question

So I tried to post on my friends wall using the following code:

var fb = new FacebookClient(_accessToken);
dynamic parameters = new ExpandoObject();
parameters.message = "Google is your friend";
parameters.link = "http://gidf.de/";
parameters.Name = "Test";
parameters.from = new { id = "100000", name = "me" };
parameters.to = new { id = "1000001", name = "friend" };
dynamic result = fb.Post("1000001/feed", parameters);

However, I get told that my application does not support this. I did some googling work, and read that [USER_ID]/feed is deprecated and that I have to invoke the feed dialog to ask the user to publish it. How would I go on doing this with the C# SDK?

Was it helpful?

Solution

As of February 6, 2013, you can't post to Friends Timeline on behalf of the user. Read Here: https://developers.facebook.com/roadmap/completed-changes/

Client-Side you can use the FB.ui method to pop up the feed dialog.
Here's an example: https://stackoverflow.com/a/15426243/1405120

Server-Side, you can use the URL Redirection.
https://www.facebook.com/dialog/feed? app_id=458358780877780 &link=https://developers.facebook.com/docs/reference/dialogs/ &redirect_uri=https://mighty-lowlands-6381.herokuapp.com/

Read more about Feed dialog here, https://developers.facebook.com/docs/reference/dialogs/feed/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top