AnsweredAssumed Answered

Facebook Alfresco Document Library setup

Question asked by jpotts Moderator on Nov 20, 2007
Latest reply on Mar 5, 2013 by aaditvmajmudar
I've walked through the "hello world" Alfresco-Facebook integration example on http://wiki.alfresco.com/wiki/Facebook and it worked fine. Now I'm trying to set up the Alfresco Document library. I must be missing a step. Here's what I've done:

1. Installed the amp.
2. Created a new Facebook app key. Snagged the app ID, app key, and secret.
3. Set my callback URL to http://<my host name>/alfresco/facebook/alfrescodoclib/
4. Created a new file in Company Home/Data Dictionary/Web Scripts/com/facebook/_apps/ called app.<app key>.js with the app ID and secret for the key created in step 2.
5. Created a new space under Company Home called FB<app id>

When I go to apps.facebook.com/<my app name> I get the stack trace shown below.

What am I missing?

Jeff

Web Script Status 500 - Internal Error

Error:   Internal Error (500) - An error inside the HTTP server which prevented it from fulfilling the request.

Message:   Failed to execute script '/home/jpotts/alfresco/webapps/community-2.9/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/facebook/doclib/canvas.post.js': Failed to execute script '/home/jpotts/alfresco/webapps/community-2.9/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/facebook/doclib/canvas.post.js': Wrapped org.alfresco.web.scripts.facebook.FacebookError: Incorrect signature (AlfrescoScript#18)

Exception:   org.alfresco.web.scripts.facebook.FacebookError - Incorrect signature
   
   org.alfresco.web.scripts.facebook.FacebookModel.getAppFriends(FacebookModel.java:143)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:585)
   org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
   org.mozilla.javascript.JavaMembers.get(JavaMembers.java:117)
   org.mozilla.javascript.NativeJavaObject.get(NativeJavaObject.java:113)
   org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1544)
   org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1375)
   org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1364)
   org.mozilla.javascript.gen.c6._c0(AlfrescoScript:18)
   org.mozilla.javascript.gen.c6.call(AlfrescoScript)
   org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
   org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
   org.mozilla.javascript.gen.c6.call(AlfrescoScript)
   org.mozilla.javascript.gen.c6.exec(AlfrescoScript)
   org.mozilla.javascript.Context.evaluateString(Context.java:1196)
   org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:511)
   org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:111)
   org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:243)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:585)
   org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
   org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
   org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:241)
   org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   $Proxy50.executeScript(Unknown Source)
   org.alfresco.web.scripts.ScriptProcessor.executeScript(ScriptProcessor.java:108)
   org.alfresco.web.scripts.AbstractWebScript.executeScript(AbstractWebScript.java:617)
   org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:124)
   org.alfresco.web.scripts.WebScriptRuntime.wrappedExecute(WebScriptRuntime.java:373)
   org.alfresco.web.scripts.WebScriptRuntime$1.execute(WebScriptRuntime.java:339)
   org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:236)
   org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:166)
   org.alfresco.web.scripts.WebScriptRuntime.transactionedExecute(WebScriptRuntime.java:350)
   org.alfresco.web.scripts.WebScriptRuntime.authenticatedExecute(WebScriptRuntime.java:293)
   org.alfresco.web.scripts.WebScriptRuntime.executeScript(WebScriptRuntime.java:152)
   org.alfresco.web.scripts.facebook.FacebookServlet.service(FacebookServlet.java:63)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
   org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   java.lang.Thread.run(Thread.java:595)
   
Exception:   org.mozilla.javascript.WrappedException - Wrapped org.alfresco.web.scripts.facebook.FacebookError: Incorrect signature (AlfrescoScript#18)
   
   org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1757)
   
Exception:   org.alfresco.error.AlfrescoRuntimeException - Wrapped org.alfresco.web.scripts.facebook.FacebookError: Incorrect signature (AlfrescoScript#18)
   
   org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:519)
   
Exception:   org.alfresco.service.cmr.repository.ScriptException - Failed to execute script '/home/jpotts/alfresco/webapps/community-2.9/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/facebook/doclib/canvas.post.js': Wrapped org.alfresco.web.scripts.facebook.FacebookError: Incorrect signature (AlfrescoScript#18)
   
   org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:115)
   
Exception:   org.alfresco.service.cmr.repository.ScriptException - Failed to execute script '/home/jpotts/alfresco/webapps/community-2.9/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/facebook/doclib/canvas.post.js': Failed to execute script '/home/jpotts/alfresco/webapps/community-2.9/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/facebook/doclib/canvas.post.js': Wrapped org.alfresco.web.scripts.facebook.FacebookError: Incorrect signature (AlfrescoScript#18)
   
   org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:247)

Outcomes