我目前正在使用Facebook Developer Toolkit发布到我组织的Facebook页面。我希望能够附加一个链接,但似乎无法弄清楚语法。这就是我正在尝试的。
ConnectSession fbSession = new ConnectSession(API_KEY, API_SECRET);
Api fbApi = new Api(fbSession);
attachment attach = new attachment();
attach.href = "http://www.google.com";
attach.caption = "Google";
attach.name = "Google";
String post = "Here's a cool new search engine I found!";
fbApi.Stream.Publish(post, attach, null, null, Convert.ToInt64(fanPageId));
这就是我想要的:
答案 0 :(得分:1)
要发布它,您需要以下列形式对JSON进行编码:
action_links:[ {text:“TITLE”,href:“LINK”} ]