Make a ColdFusion Facebook Application in 8 minutes!
A lot like 8 minute abs without the burn!
1ST STEP: Watch this video
2nd STEP: Download this application
3rd STEP: Watch this video
LAST STEP:
upload all your files to your server and go to your canvas page url (http://apps.facebook.com/your_app_name)!
OK, so, as per your instructions (above), I (1) followed the procedure in your post “Setting Up Your First Facebook Application” (and the accompanying video), (2) downloaded your CF FB demo, (3) configured Application.cfm as per your video, (4) uploaded the demo files to my server, and (5) went to my canvas page URL. And then, to my surprise…
It all worked! The first time. With no tweaking.
Maybe I’m a skeptic, but that was the *last* thing I expected to happen.
Now I’m looking forward to reviewing every line of code until I understand *why* it works. I can’t imagine a better intro to building CF FB apps. I have several books on creating FB apps, but (1) they’re all out of date, and (2) they all concentrate on PHP — which I could puzzle out, but now I don’t have to.
I can’t thank you enough, wonderful stuff.
thanks for the kind word
. it might be 12 minute apps but that just doesn’t go together very well!
it takes 8 minutes or less if you don’t watch the video, so we’ll go off that.
I’ve been looking over the code in your sample app — and if I’m understanding it correctly, it looks like you’ve done all the hard work. (Thanks!!)
What I mean is: Let’s say that all I wanted to do was to build an app that included existing FB functions that I can implement via FBML. (Yes, that would be a pretty lame app, this is just for the sake of argument.) It looks to me like all I’d have to do is use application.cfm, FacebookFBMLClient.cfc, and fbRoute.cfm right out-of-the-box (maybe lock the CFC call in application.cfm), then revise index.cfm and related files to do what I want them to do, and I’d have a working app. In other words, I don’t really need to understand what application.cfm, FacebookFBMLClient.cfc, and fbRoute.cfm are doing, I can simply use them as-is and build my app on top of them.
Is my understanding correct?
yes, if you don’t plan on diving 100% into Facebook you technically don’t need to know what those pages do.
if your calling API’s etc… you will have to know what the page does. it really is pretty simple what is going on in the code and a lot of my videos cover the basics.
good luck!
Hi Gavin,
Really great tutorial, it helped me understand a lot (especially how attainable creating a Facebook app actually is). However affter following you instructions three times over, I’ve yet to get a working app. I keep recieving this error on my canvas page… Any ideas?
Errors while loading page from application
Received HTTP error code 500 while loading http://www.candormedia.com/fb_nfartcards/?_fb_fromhash=bb23bf40363688c93ccc0b13b9482867
it works, trust me… if your trying today… it wouldn’t up until now as Facebook had errors with setFBML and getFBML tags (as far as i know)
this caused ALL apps to go down and ALL apps would not work. i get a lot of e-mails from people saying it does not work but a good thing to keep in mind as Facebook grows, they have mess-ups too.
so far a handful of times i can count where a tag or api has gone down. try it again. if you get errors like 302 Temporarily Moved… odds are its not you and you have to wait for Facebook (which doesn’t take long) to fix the issues.
I was getting the 302 Temp Moved errors today.
I could see it was from something in FBMLClient.cfc, and was only affecting pages where I was calling the CFC (for fqlQuery in my case). I checked the Humorous app and went to a page that I figured would also hit something like that – your Invite Friends page – and saw your page was blank. So I figured you were catching the error so at least the typical Facebook error didn’t show up.
That’s why now I’m putting around all of my canvas pages between the header and footer. If an error is caught, I’m doing
Connection with Facebook Failed
It seems there is a temporary problem with our ability to connect with Facebook. Please try back soon.
Otherwise I was getting the nasty Facebook error that wasn’t very helpful to anyone.
Thanks for all the help Gavin!
Gavin,
Thanks for making all of this information available. I’ve downloaded your files, made changes to the application.cfm file, and completed my settings file on Facebook. I’ve been trying to troubleshoot this for the past couple of days and it seems like I’m stuck.
I’m getting the following on Facebook when to go to my application:
Errors while loading page from application
Parse errors:
CSS Error (line 9 char 8): Unrecognized at-rule or error parsing at-rule.
FBML Error (line 13): illegal tag “body” under “fb:canvas”
My server also throws the following:
Variable FB_SIG_USER is undefined.
Any ideas would be appreciated.
Sam Singer
if your hitting the page directly from your server and removed the authorized catch, then it’s totally normal to get the FB_SIG_USER error since you have no user as your outside of Facebook.
something in your setup must be wrong. did you change anything before you tested the initial setup? a buddy of mine here at work used it two days ago and it worked perfect.
also, right click and give me the cferror you are getting on the page. you can view the error if your the app owner.
Gavin,
I’m hitting the page from the “About Page” http://www.facebook.com/apps/application.php?id=(removed) by clicking the “Go to Application” link.
I’m being email the CF error from my CF server. I can forward the email to you. First, mail me at singess@auburn.edu, and I’ll mail you back.
Thanks,
Sam
Hey Gavin
thanks for your work on this. I finally made it work and I thought sharing why it was giving me problems.
It is actually very simple, not related to your library at all, I had the Developer Edition of coldfusion installed in the server I was testing on and the application was being called from several IP addresses in the facebook server farm, hence it was displaying the awful HTML Error 500 95% of the requests.
ChrisPostill was getting this error above, I found out about the license restriction by enabling the debugging errors for all IPs and right-click -> check source to read the cferror message returned by my server.
Thanks again, you saved me quite a few hours of work,
Javier
Gavin –
Great tutorial. I was able to get the initial page loaded very easily. When I sent an invitation, I got the error below. I did not see a “do-it.cfm” file in the .zip.
———————————–
Errors while loading page from application
Received HTTP error code 404 while loading http://MYDOMAIN/cf-facebook/do-it.cfm
There are still a few kinks Facebook and the makers of robbytest are trying to iron out. We appreciate your patience as we try to fix these issues. Your problem has been logged – if it persists, please come back in a few days. Thanks!
———————————————-
Gav,
I am having the same problem that was addressed above by Sam. I have attempted the set up 2 on different occassions, both with the same issue. Any suggestion for a path to head down?
Bob L.
“Variable FB_SIG_USER is undefined”
———————————————————–
The error occurred in D:\home\mysitenamehere.com\root\moneymerchant\Application.cfm: line 45
43 :
44 :
45 :
46 :
————————————————————
Is there a way for the application to be added as a TAB in our profile? I don’t see that option with your example humerous app?
Thanks.
If anyone has the following problem:
Received HTTP error code 405 while loading
Check your callback URL… I forgot to add ‘/’ to the end of my URL!
http://www.mysite.co.uk/cf-facebook/
HTH
THANK YOU! Keep up the great work, you have created a great resource…you saved me MUCH time in figuring this out.
This is great! Thanks for sharing your knowledge with the rest of the development community. I struggled a bit until I figured out that the Canvas URL has to be lowercase, but once I figured that out, the app came to life! Thanks…
Hi,
Great tutorial, thanks. Do you have any samples of Facebook Connect & CF ? Niall.
Thank you for the tutorial, it was a great help creating my first FB app!
Gav.. Excellent post. Saved me a lot of reading.. Looking forward for more of your tutorials..
Gavin – this is great, a solid foundation. I have a few apps in prototype now, thanks to you. One question – as an example, I have developed a twitter app that pulls our latest twits and posts them. But it does not refresh in a users profile – but if I go the the apps.facebook.com page, it refreshes the cache(?), and I can see it fine, and it it then also refreshed in my profile. Is there a simple way to refresh the app cache, something I can run on (say) a daily basis?