views:

222

answers:

1

Hi,

I am trying to get ColdFusion 8 work with FB Connect

I am running CF8 on IIS, Windows Server 2003.

I use this FB Connect wrapper for ColdFusion written by James Constable,

http://jamesconstable.co.uk/web-development/facebook-connect-library-for-coldfusion

The library is written for Railo server, I managed to port it (or i think so) to IIS, but it gives me this error

Loop error. Invalid collection [expires, session_key, ss, user]. Must be a valid structure or COM object.

From there I deduct that the init method has been called, but the fb params is not populated.

I am now trying to merge the FBML API by Gavin on RIAA with that wrapper. No success so far.

I am panicking now, this is my first CF project, a bit clueless :).

Needing some enlightenment :)

Thank you in advance,

.tre.

+3  A: 

First of all, you can not "port" Railo application to the IIS, because these are two different-purpose systems. Railo is application server (engine) for CFML language, like Adobe ColdFusion. IIS is web-server. IIS (or Apache) is used to serve HTTP requests and forward them to the CFML engine. It can be done in different ways, it's just an example of typical one.

There are some (mostly minor) differences in CFML syntax support in Railo and Adobe CF, that's what author mentioned in his post.

Your error should mean that you are trying to loop using something like this

<cfloop collection="#MyCollection#"></cfloop>

having MyCollection not of structure data type.

Try to check this variable before loop start, simplest way is to dump it and see.

Next try to track down how this dataset constructed and populated, this should help to find the roots of the problem.

Quick look on the code gives few possible places of this, possibly in makeRequest method.

Hope this helps.

UPDATE

Think I found a reason.

Adobe CF does not support the following structure syntax:

{'session_key': this.fb_params['session_key']}

Try to change to the

{session_key = this.fb_params['session_key']}

Also review the code for the other similar examples.

Generally, Railo more flexible in this. I accepts all these forms:

<cfset woo = {woo = "hoo"} />
<cfset woo = {'woo' = "hoo"} />
<cfset woo = {woo: "hoo"} />
<cfset woo = {'woo': "hoo"} />

But not ACF.

This is one of the reasons why I love Railo more :)

Sergii
Thanks Sergii,My bad, I meant port Railo to Adobe CF8. I changed just a few syntax difference.Your guess on makeRequest method is spot on, I will try dumping the fb_params. Thank you.
tre
See update, maybe it can help.
Sergii
thanks Sergii :). I ended up switching to PHP as the deadline comes closer, so I cannot confirm your solution. But this will come in handy next time. Thanks again, appreciate it.
tre