Browsing articles tagged with " Programming"
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.

Feb 1, 2010

How Do You Code?

I consider myself a decent programmer but I know that there is a ton more to learn and no one programmer will ever know everything as programming is evolving all the time. But occasionally, programmers come across a decision on how to program a certain site/job. As a C# developer, I always prefer to code in C# but does it make sense to not always do what you’re comfortable in?

For example, if I have a site that I need to create and server isn’t an issue, do I do it in what I’m good at with C# or do I try coding it in PHP?

I guess my question is “would you rather be better at one thing or pretty good at a few things?” What is better for you?

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
Mar 11, 2008

Things to do with Facebook

FacebookSo it’s been a while since I wrote but it’s partially because of stuff I’ve been doing with Facebook. That and I’m lazy. I’ve worked on teams that have released 3 applications and in the process of finishing 1 at work right now. Along with those, I’ve personally released 1 and have 2 that I have in the works. So lots of apps in my head right now.

The first app we did is called Finders Keepers. It is a really cool wishlist site where you can keep products on your Wishlist, send your friends items for their Wishlists or buy products. It was my first adventure into a real, fully functional, Facebook application. It was tough but it all came together thanks to a great team and I am proud to say that I worked on it. It is going through some major revisions so keep an eye out for those in the upcoming weeks.

The second app we did was for the Pontiac Game Changing Performance. We worked with ESPN for the College Football season and just last week released the new version for College Basketball just in time for March Madness. We implemented a really nice recruiting component for it that I think helps out with the social aspect that all applications strive to find.

The third application is one that hasn’t been fully released yet but I used the new Facebook JavaScript Client Library. Using this allows you to write applications that do not need to live within the Facebook site. Now any site that can use JavaScript can use it. Really nice and once more documentation shows up, it will get only better.

Personally, I released an RSS reader application last October while I was trying to learn just how the API worked. You can find it here. Simply put, the user adds the feed that they want, how many items, and there it is. Still has some issues with it I am finding but not too bad for a first time app I think. Add it and let me know what you think.

So pretty much since October, I have been working on Facebook apps. I’ve done some in ASP.NET C# and a couple in PHP. I gotta say that each has its pros but being a .NET guy, I had a bit of an easier time with those. But that’s the beauty with the Facebook apps. It doesn’t matter what your comfort level is. You can do it in any language it seems. Facebook releases theirs in PHP and Java but there are many APIs written in whatever language you want. At Terralever, we wrote our own API for the .NET framework and I find it really easy to work with.

So if you’re wanting to get into writing your own Facebook app, it’s really easy to get started. There is a lot of people out there to help now. So do what I did and build a dinky little app and go from there.

Pages:12»