开发者

Facebook c# sdk - how to make "Share" link show up when publishing post

I'm using Facebook C# SDK in order to post content on a profile's wall. Whatever gets posted to the wall does not include the "Share" link. It has "Like" and "Comment," but not "Share."

Question: how to I make that Share link show up? Thanks!

Some code...

string profileId = "XYZ";
string accessToken = "abc"; // I already know how to get accessToken

Facebo开发者_开发百科okClient client = new FacebookClient(accessToken);

dynamic messagePost = new ExpandoObject();
messagePost.access_token = accessToken;
messagePost.picture = "http://pic.com/pic.png";
messagePost.link = "http://www.examplearticle.com";
messagePost.name = "name goes here";
messagePost.description = "description goes here";

var result = client.Post(string.Format("/{0}/feed", profileId), messagePost);

Is there something like messagePost.enableShare = "true", or messagePost.type = "shareableLink" ?


Simple fix:

var result = client.Post(string.Format("/{0}/links", profileId), messagePost);

By using "/links" instead of "/feed," the Share link shows up.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜