开发者

Facebook Connect on Coldfusion 8

开发者 https://www.devze.com 2022-12-22 09:45 出处:网络
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,

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 thi开发者_运维知识库nk 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.


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 :)

0

精彩评论

暂无评论...
验证码 换一张
取 消