tags:

views:

76

answers:

1

I'm currently using the Facebook Developer Toolkit to publish to my organization's Facebook page. I'd like to be able to attach a link, but can't quite seem to figure out the syntax. Here's what I'm trying.

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));

Here's what I'm going for:

alt text

A: 
  1. Don't use that the Facebook Developer Toolkit because it's not being properly supported (personal opinion :P) use the FacebookC#SDK
  2. What you want to post are referred to as 'action_links' and can only be posted using the OLD REST API, not the new graph api (https://api.facebook.com/method/stream.publish)
  3. In order to post it you need to encode the JSON in the form:

    action_links: [ { text: "TITLE", href: "LINK"} ]

BeRecursive
I will give the Facebook C# SDK a shot. Thanks for the tip. I've tried using Action Links before and what I get is an additional link in the row at the bottom (i.e. "Comment", "Like", "Share", "Promote", "MyLink").
Kyle

related questions