Reputation: 7429
Can we post pictures/videos or links on friends wall using facebook SDK c#? i am using it in winforms .I am using this SDK https://github.com/facebook/csharp-sdk
Upvotes: 2
Views: 2172
Reputation: 159
It's recommended to use PostTaskAsync instead of obsolete PostAsync method of FacebookClient. The parameters remain the same.
Upvotes: 0
Reputation: 1181
public static void PostToWall(string wallPost, string friendId)
{
var fb = new FacebookClient(Globals.AccessToken);
var parameters = new Dictionary<string, object>();
parameters["message"] = wallPost;
fb.PostAsync(String.Format("{0}/feed", friendId), parameters);
}
If you want to post it to the wall of the user logged in, use:
fb.PostAsync("me/feed", parameters);
Upvotes: 3
Reputation: 4672
You must have your application user grant stream_publish extended permissions then you may use the Graph API to publish to friends' streams.
Upvotes: 2