Where are the definitions of new integration points in facebook.

Sep 23, 2008 at 5:33 PM
When you setup the application, there a lot of new options for actions, callbacks, profile, sidenav, etc., but there is no real documentation on how to use them. Anyone know where that documentation would be?
Sep 24, 2008 at 8:24 AM

Yup, there's a brief guide here http://developers.new.facebook.com/get_started.php?tab=anatomy

More info on the wiki http://wiki.developers.facebook.com/index.php/New_Design_Integration_Guide
and an FAQ http://wiki.developers.facebook.com/index.php/New_Design_User_Login

But you're right in that it's not that indepth.

Keep an eye on this guy's blog: http://www.stevetrefethen.com/blog/CategoryView,category,Facebook.aspx 
most of the content is outdated for the current version, but I found it helpful when I was starting out.

Sep 24, 2008 at 6:38 PM
Thanks. It seems that they keep adding new integration points but the documentation is nothing more then restating what the label is.
Sep 25, 2008 at 8:43 AM
Edited Sep 25, 2008 at 8:44 AM
Unfortunately it's very sparse. I think if you look in the wiki for specific words / parts of the app settings page you should turn up something useful. If you have a look at the list of new API calls you should get a feel for how setting info should work etc.

It's also always worth searching the facebook dev forums for info: http://forum.developers.facebook.com/

Although it's worth noting that the current version of this toolkit doesnt allow user.setinfo, it's broke.
Sep 25, 2008 at 2:47 PM
Yes, I wrote my own setinfo based on things I read, and recompiled it myself. So I'm cool there. I actually have things working now, I just want to know what my options are with those integration points. Thanks again.
Sep 25, 2008 at 4:17 PM
cartango - could you help the rest of us out and provide the code you used for your setinfo?  Also, maybe one of the developers could include it so the sample projects work... 
Sep 25, 2008 at 4:38 PM
Sorry, I thought it was setinfo that I added. It was feed.publishUserAction. setinfo is still screwing me up. Sorry to get your hopes up.
Sep 26, 2008 at 9:06 AM
It could be good to know how you went about implimenting feed.publishuseraction , if you could share that would be great :)
Sep 26, 2008 at 2:34 PM
Edited Sep 26, 2008 at 2:42 PM
In order to give credit where credit is due, I'll give you the link I used.
The key is that that you have to then register your templates using code because the register templates in your application setup doesn't give you a template that is recogized by new api. The tricky part is that when you register this template, there is no UI to find out what template id is because if you view the registered templates, the templates you register progromatically do not show up. So my code to register the template was a page like this: (where litText is a literal control on the page). This keeps messing up so I'm posting across severl posts.
--------------------------------register template---------------------------------------------------------------------------
string t1 = WebConfigurationManager.AppSettings["TemplateID3"];

        List<string> one_line_story = new List<string>();
        one_line_story.Add("{*actor*} blah blah");

        List<feedTemplate> short_story = new List<feedTemplate>();
        feedTemplate short_story_template = new feedTemplate();
        short_story_template.TemplateTitle = "{*actor*} blah blah!";
        short_story_template.TemplateBody = "{*actor*} blah blah {*car*} was <fb:pronoun uid=”actor” possessive=”true” useyou=”false”/> blah blah!";
        short_story_template.PreferredLayout = "1";

        feedTemplate full_story = new feedTemplate();
        full_story.TemplateTitle = "{*actor*} blah blah</a>!";
        full_story.TemplateBody = @"{*actor*} blah blah {*car*}<img src='{*image*}' />was <fb:pronoun uid=""actor"" possessive=""true"" useyou=""false""/>blah blah  {*url*}blah blah";
<BR< body>

Sep 26, 2008 at 2:45 PM

if (string.IsNullOrEmpty(t1))
            long bundle1id = oAPI.feed.registerTemplateBundle(one_line_story, short_story, full_story);
            litText.Text = "Bundle added was " + bundle1id + " html break that seems to mess up this post" ;
            litText.Text = "Bundle 1 is " + t1 + " html break ";

        IList<facebook.Schema.template_bundle> oFBTemplateList = oAPI.feed.getRegisteredTemplateBundles();
        IEnumerator<facebook.Schema.template_bundle> oEnum = oFBTemplateList.GetEnumerator();
        litText.Text += oAPI.ApplicationKey +  " html break ";
        litText.Text += oFBTemplateList.Count.ToString() + " html break ";
        while (oEnum.MoveNext())
            litText.Text += oEnum.Current.template_bundle_id.ToString() + ":" + oEnum.Current.time_created.ToString() +  " html break ";

Now you have the template id.

Sep 26, 2008 at 2:49 PM
Edited Sep 26, 2008 at 2:50 PM

TO use this template do this.

Int64 iUID = Convert.ToInt64(Session["facebook_userId"].ToString());
Dictionary<string,string> oTemplateData = new Dictionary<string,string>();

oTemplateData.Add("car", sVehicleDesc);
oTemplateData.Add("url", sNavigateUrl)
oTemplateData.Add("image", sImageURL);
List<facebook.feedImage> oImageList = new List<facebook.feedImage>();
facebook.feedImage oImage = new facebook.feedImage();
oImage.Href = sNavigateUrl;
oImage.Src = sImageURL;

string sWideBody = "";
string sNarrowBody = "";

 _fbService.feed.publishUserAction(Convert.ToInt64(WebConfigurationManager.AppSettings["TemplateID3"].ToString()), oTemplateData, oImageList, "", "", null);
        using (StreamReader reader = new StreamReader(Server.MapPath("~/App_Data/ProfileWide.txt")))
         sWideBody = ReplaceCustomTags(reader.ReadToEnd(),sNavigateUrl,sVehicleDesc,sImageURL,iSurveyID);                       
        using (StreamReader reader = new StreamReader(Server.MapPath("~/App_Data/ProfileNarrow.txt")))
                sNarrowBody = ReplaceCustomTags(reader.ReadToEnd(), sNavigateUrl, sVehicleDesc, sImageURL,iSurveyID);
        string html = string.Format("{0}{1}",sWideBody,sNarrowBody);
        _fbService.profile.setFBML(iUID, html, html, html);

Sep 26, 2008 at 2:53 PM

So that's pretty much it. You'll notice I filled the TemplateData Dictionary with the key/value pair's to replace the tags in my template. (actor is built in and doesn't need replaced)
As an added bonus I threw in the code to write to the narrow and wide profile boxes. The ReplaceCustomTags method is mine and it just replaces my custom tags in the FBML text with the approriate words, so I didn't include that.

I hope that helps a lot of people because it took me about about 2.5 weeks of on and off work to get this right due to the lack of meaningful documentation.

NOTE: I had this beautifully written post doublechecked variable names changed to less specific names laid out nicely and when I posted, it was completely screwed up. Since I changed things in the post I didn't feel like doing the whole thing again. So if there any errors, let me know, I might have made a pasting and editing mistake the second time.

Sep 26, 2008 at 10:05 PM
Man, this looks like exactly what I need but the problem I have is there's no "publishUserAction()" method in the Master Page API... e.g. this.Master.API.feed.publishUserAction(); ...doesn't exist!  (gotta love that namespace too).

I started going down this path (http://wiki.developers.facebook.com/index.php/New_Design_Feed_Forms) but as per usually, I got so lost amongst the documentation that I'd forgotten where my ass was.  Why is nothing simple!?  By the way, don't forget to put <YOUR CODE HERE> http://wiki.developers.facebook.com/index.php/Creating_a_Popup_Dialog_in_an_IFrame

Sep 29, 2008 at 1:38 PM
Edited Sep 29, 2008 at 1:57 PM

see the post at http://www.codeplex.com/FacebookToolkit/Thread/View.aspx?ThreadId=34590

that is where I got the code for the publishUserAction

incidentally, has anyone noticed that Google Chrome browser messes up whatever you type in here.
Sep 30, 2008 at 9:48 AM
Thanks for that, is always good to get more workarounds!

yeah, I have to use codeplex in IE (or IE tab in firefox), it doesn't work well otherwise.