yugalkishorbais
yugalkishorbais

Reputation: 119

Could not find the ColdFusion component or interface?

I am using ColdFusion 10, Windows 7 64bit, Railo 4 and installed the Facebook CF SDK. When I try to test the installation, it is throwing this error:

Could not find the ColdFusion component or interface facebook.sdk.FacebookApp.

Ensure that the name is correct and that the component or interface exists.

The error occurred in C:/ColdFusion10/cfusion/wwwroot/facebook-cf-sdk/examples/website/index.cfm: line 34
32 : } else {
33 :    // Create facebookApp instance
34 :    facebookApp = new FacebookApp(appId=APP_ID, secretKey=SECRET_KEY);
35 : 
36 :    // See if there is a user from a cookie or session

How do I fix this error and integrate this Facebook API with ColdFusion?

Upvotes: 2

Views: 881

Answers (2)

Minh Vo
Minh Vo

Reputation: 11

Busches' answer should definitely solve the problem. The other alternative is to modify the imports to match your directory structure:

facebook-cf-sdk / examples / website / index.cfm

<cfscript>
import "facebook-cf-sdk.sdk.FacebookApp";
import "facebook-cf-sdk.sdk.FacebookGraphAPI";

facebook-cf-sdk / examples / website / tags.cfm

<cfimport taglib="/facebook-cf-sdk/sdk/tags" prefix="facebook" />
<cfscript>
import "facebook-cf-sdk.sdk.FacebookApp";
import "facebook-cf-sdk.sdk.FacebookGraphAPI";

The quotes are needed for component paths that contain hyphens.

Hope this helps, - Minh

Upvotes: 1

Busches
Busches

Reputation: 1964

It looks like an error in the instructions, instead of having the folder be called facebook-cf-sdk rename it to facebook as that's where it's looking for the cfc at.

Upvotes: 3

Related Questions