Browsing articles tagged with " API"
Aug 2, 2010

New Fun Inside of Facebook’s C# SDK

Two weeks ago Facebook released their own C# SDK for developers to use. I downloaded it right off the bat but noticed that it had a few holes in it but did give a clean way to call their new Graph API.

One of the most glaring issues was that it can’t authenticate fully. I looked all over Google for it and finally found out that it’s an issue with the cookie that Facebook itself writes. The first key in the cookie is access_token and that passes the token from Facebook that allows you to make calls on behalf of the logged in user. Well the cookie’s value itself is one big string wrapped inside of quotation marks so the key is “access_token rather than access_token. This caused some hairpulling on my part but now that it is coded for it, it is working like a charm.

So the code should read like this if you’re using C#:

GetFacebookCookieValue("\"access_token")

Hope that helps anyone who ran into that as I did.

Mar 11, 2009

Phoenix .NET User Group Experience

Last night I was lucky enough to attend my first Phoenix .NET User Group meeting and enjoyed it.  Microsoft is nice enough to let them use a room in their Phoenix office and gave away a keyboard/mouse set, a web cam, and a few books.

Tim Rayburn started it off with an Intro to WCF Services and for a guy who has barely touched these, it was very informative.  Tim did an excellent job presenting and made it easy to follow along.

Rob Paveza followed up with a discussion on a new Facebook API that he has developed.  I worked with Rob at Terralever and know that he does an awesome job whenever he has the chance to run wild in code and from the looks of it, this isn’t any different.  It’s not released as of yet but it will be found here by the end of the week so check it out.

Thanks to Scott Cate and Rob Bagby for helping out with this.  I hope to check out a few more of these in the future.

Jul 8, 2008

Update to Facebook’s New API

Last week I posted an entry about the new Facebook API that is due to be released sometime this summer. Well today, it was announced that Facebook is opening it up for all users to check out on July 16th. While this isn’t the official launch, it still seems pretty close seeing as how the API is really buggy currently and on the Developer Forums, a lot of the programmers haven’t starting converting their apps over yet.

There is no mention of the “official” launch date as of yet but they say in their post that “early next week, we’ll post more answers to FAQs and share the new policies around the new profile design.” That seems kind of bad since they are opening up the new platform to everyone to check out next week as well. I foresee a lot of people complaining that the apps they have installed don’t work. Of course they don’t, programmers are still working with the buggy API and trying to find their way around in a new, dark room.

I am one who is 100% in favor of the new look and feel that Facebook is releasing but personally I feel that they need to get the API working closer to 100% rather than 50% and have more documentation before they announce to the masses to “come check this out.” Luckily they aren’t requiring all apps to use the new API as of yet but hopefully it won’t come too soon.

Jun 30, 2008

Working with New Facebook API

Facebook logo - Image Via WikipediaAs I’ve written previously, I have worked on a few Facebook applications. I’ve gotten quite familiar with the intricacies of Facebook and how things work using its API. It’s an interesting way of doing things if you ever get the chance to check it out.

Anyhow, I’ve been working for the past week or so on getting to know the new API and platform changes that Facebook should be releasing in the next month or so. While it seems that a lot of things will just work as is, there are a couple of main points that will need to be changed for any Facebook app written on the current platform.

The main change I feel is the way that the application publishes feeds. Previously, you would call the Feed.publishTemplatizedAction function. It is pretty basic and relatively easy to understand. With the new platform, this old call is being removed and to be replaced with a couple of API calls. With the old platform, you needed to register your templates, get a Template ID back from Facebook, and then use that to call your feeds whenever.

I had a lot of issues at first getting the syntax correct on how the data was passed to the feeds since there isn’t a lot of documentation on how they are supposed to look. Especially since Facebook changed the call Feed.registerTemplateBundle. But once I got the new changes implemented and the hang of it, publishing feeds stories finally worked as they once did.

The big change to the feed stories is that you are able to have 3 feed sizes. The default is the one-liner. Just like it sounds, one line of copy. Next are the short story and the full story. They are very similar with the exception that you actually register an array of short stories with each one having one less dynamic piece than the one before it. With full stories, you only register one but you can make it large. I’m not sure of the size difference between the short and full stories as I don’t think that has been decided as of yet. If so, let me know.

Those are really the only things that I have done with the new API as of yet. Seems really cool but also a lot of work to keep your old apps working seamlessly. First of all, each application that you have, you will have to run the Feed.registerTemplateBundle API function to get a template ID for your app to use exclusively. Secondly, you will have edit your API calls to now call the Feed.publishUserAction instead of the Feed.publishTemplatizedAction call being made previously. It’s not a “huge” change but still there are a few differences.

My idea for updating the apps that I have worked on was to just change the API code that we use on every project but I have seen that won’t work exactly as I had planned. Currently, I pass the entire feed story as a string into the API call but with the new way, I’m going to have to pass a JSON array because the story itself has already been registered along with the template ID. It’s not a big deal but it would be nice if Facebook made their API a little bit more backwards compatible. But I can see why they are doing it this way. Everything is changing and it would be hard to keep the old stuff working. I would like the ability to register templates like they do it currently through a form on the Facebook site. That way I wouldn’t have to create a page on each app just to get a number back and then remove that page. Seems like kind of a waste to me but it’s still early, maybe they’ll do that.

If you have worked with the new Facebook API, I would love to hear about your experiences and what you think about some of the pending changes. I’m excited to see what changes end up happening and where the platform goes.

Zemanta Pixie