ianlee-dev / facebook-java-api

Automatically exported from code.google.com/p/facebook-java-api
0 stars 0 forks source link

I am getting incorrect signature error. #133

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi All,

        I am using java facebook-api-2.0.2 version.I am uploading photos 
from my app to facebook application.After receiving the response it 
displays an incorrect signature error. Please give me the solution.

<photos_createAlbum_response>  <aid>16:11:59,250  INFO 
FacebookSynchronization:191 - Text Node album_id0
</aid>
  <cover_pid>16:11:59,250  INFO FacebookSynchronization:191 - Text Node 
album_id0
</cover_pid>
  <owner>16:11:59,250  INFO FacebookSynchronization:191 - Text Node 
album_id0
</owner>
  <name>16:11:59,250  INFO FacebookSynchronization:191 - Text Node 
album_id0
</name>
  <created>16:11:59,250  INFO FacebookSynchronization:191 - Text Node 
album_id0
</created>
  <modified>16:11:59,250  INFO FacebookSynchronization:191 - Text Node 
album_id0
</modified>
  <description></description>
  <location></location>
  <link>16:11:59,250  INFO FacebookSynchronization:186 - Yes
16:11:59,250  INFO FacebookSynchronization:188 -  Node 
Value:::http://www.facebook.com/album.php?aid=70747&id=606606353
16:11:59,250  INFO FacebookSynchronization:189 -

 In the check of the if loop70747

16:11:59,250  INFO FacebookSynchronization:191 - Text Node album_id70747
</link>
  <size>16:11:59,265  INFO FacebookSynchronization:191 - Text Node 
album_id70747
</size>
</photos_createAlbum_response>
16:11:59,265  INFO FacebookSynchronization:44 -
70747
com.google.code.facebookapi.FacebookException: Incorrect signature
        at 
com.google.code.facebookapi.FacebookXmlRestClient.parseCallResult
(FacebookXmlRestClient.java:205)
        at 
com.google.code.facebookapi.FacebookXmlRestClient.parseCallResult
(FacebookXmlRestClient.java:67)
        at com.google.code.facebookapi.ExtensibleClient.callMethod
(ExtensibleClient.java:612)
        at com.google.code.facebookapi.ExtensibleClient.photos_upload
(ExtensibleClient.java:841)
        at 
com.mobileserver.synchronization.FacebookSynchronization.uploadPhoto
(FacebookSynchronization.java:45)
        at com.mobileserver.actions.FaceBookAction.uploadPhotoToFacebook
(FaceBookAction.java:162)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.struts.actions.DispatchAction.dispatchMethod
(DispatchAction.java:270)
        at org.apache.struts.actions.DispatchAction.execute
(DispatchAction.java:187)
        at org.apache.struts.actions.MappingDispatchAction.execute
(MappingDispatchAction.java:169)
        at org.apache.struts.action.RequestProcessor.processActionPerform
(RequestProcessor.java:431)
        at org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:236)
        at org.apache.struts.action.ActionServlet.process
(ActionServlet.java:1196)
        at org.apache.struts.action.ActionServlet.doPost
(ActionServlet.java:432)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:206)
        at 
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilter
Internal(OpenSessionInViewFilter.java:174)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter
(OncePerRequestFilter.java:77)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:230)
        at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:175)
        at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:104)
        at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:261)
        at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:844)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
(Http11Protocol.java:581)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run
(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:595)
16:11:59,703  WARN ActionMapping:78 - Unable to find 'null' forward.

Original issue reported on code.google.com by shivaramaraju on 6 Nov 2008 at 11:06

GoogleCodeExporter commented 8 years ago
can you give me some more information?  we've been having issues with non ascii
characters in photo captions and stuff, do you think this would be related?

Original comment by fern...@gmail.com on 18 Nov 2008 at 3:48

GoogleCodeExporter commented 8 years ago
issue 23 is the possibly related issue I was talking about.

Original comment by fern...@gmail.com on 18 Nov 2008 at 5:03

GoogleCodeExporter commented 8 years ago
Hi All, 

Please find the console out put of the maven's failure. 

C:\GCode\release-2.0.2>mvn clean install 
[INFO] Scanning for projects... 
[INFO] Reactor build order: 
[INFO]   Facebook Java Library - Parent Pom 
[INFO]   Facebook Java Library 
[INFO]   Facebook Java Library 
[INFO] 
------------------------------------------------------------------------ 
[INFO] Building Facebook Java Library - Parent Pom 
[INFO]    task-segment: [clean, install] 
[INFO] 
------------------------------------------------------------------------ 
[INFO] [clean:clean] 
[INFO] [site:attach-descriptor] 
[INFO] Preparing source:jar 
[WARNING] Removing: jar from forked lifecycle, to prevent recursive 
invocation. 
[INFO] No goals needed for project - skipping 
[INFO] [source:jar {execution: default}] 
[INFO] [install:install] 
[INFO] Installing C:\GCode\release-2.0.2\pom.xml to C:\Documents and 
Settings\sa 
mbaraju\.m2\repository\com\google\code\facebookapi\parent-pom 
\2.0.2\parent-pom-2 
.0.2.pom 
[INFO] 
------------------------------------------------------------------------ 
[INFO] Building Facebook Java Library 
[INFO]    task-segment: [clean, install] 
[INFO] 
------------------------------------------------------------------------ 
[INFO] [clean:clean] 
[INFO] Deleting directory C:\GCode\release-2.0.2\facebook-java-api- 
schema\target 

[INFO] [jaxb2:generate {execution: default}] 
Cannot find CatalogManager.properties 
[INFO] Succesfully generated output to: C:\GCode 
\release-2.0.2\facebook-java-api 
-schema\target\generated-sources\xjc 
[INFO] [resources:resources] 
[INFO] Using default encoding to copy filtered resources. 
[INFO] [compiler:compile] 
[INFO] Compiling 88 source files to C:\GCode\release-2.0.2\facebook- 
java-api-sch 
ema\target\classes 
[INFO] [resources:testResources] 
[INFO] Using default encoding to copy filtered resources. 
[INFO] [compiler:testCompile] 
[INFO] No sources to compile 
[INFO] [surefire:test] 
[INFO] No tests to run. 
[INFO] [jar:jar] 
[INFO] Building jar: C:\GCode\release-2.0.2\facebook-java-api-schema 
\target\face 
book-java-api-schema-2.0.2.jar 
[INFO] Preparing source:jar 
[WARNING] Removing: jar from forked lifecycle, to prevent recursive 
invocation. 
[INFO] [jaxb2:generate {execution: default}] 
[INFO] Skipped XJC execution.  Generated sources were up-to-date. 
[INFO] [source:jar {execution: default}] 
[INFO] Building jar: C:\GCode\release-2.0.2\facebook-java-api-schema 
\target\face 
book-java-api-schema-2.0.2-sources.jar 
[INFO] [install:install] 
[INFO] Installing C:\GCode\release-2.0.2\facebook-java-api-schema 
\target\faceboo 
k-java-api-schema-2.0.2.jar to C:\Documents and Settings\sambaraju 
\.m2\repositor 
y\com\google\code\facebookapi\facebook-java-api-schema\2.0.2\facebook- 
java-api-s 
chema-2.0.2.jar 
[INFO] Installing C:\GCode\release-2.0.2\facebook-java-api-schema 
\target\faceboo 
k-java-api-schema-2.0.2-sources.jar to C:\Documents and Settings 
\sambaraju\.m2\r 
epository\com\google\code\facebookapi\facebook-java-api-schema 
\2.0.2\facebook-ja 
va-api-schema-2.0.2-sources.jar 
[INFO] 
------------------------------------------------------------------------ 
[INFO] Building Facebook Java Library 
[INFO]    task-segment: [clean, install] 
[INFO] 
------------------------------------------------------------------------ 
[INFO] [clean:clean] 
[INFO] Deleting directory C:\GCode\release-2.0.2\facebook-java-api 
\target 
[INFO] [resources:resources] 
[INFO] Using default encoding to copy filtered resources. 
[INFO] [compiler:compile] 
[INFO] Compiling 40 source files to C:\GCode\release-2.0.2\facebook- 
java-api\tar 
get\classes 
[INFO] 
------------------------------------------------------------------------ 
[ERROR] BUILD FAILURE 
[INFO] 
------------------------------------------------------------------------ 
[INFO] Compilation failure 
C:\GCode\release-2.0.2\facebook-java-api\src\main\java\com\google\code 
\facebooka 
pi\ExtensibleClient.java:[192,21] inconvertible types 
found   : com.google.code.facebookapi.ExtensibleClient<T> 
required: com.google.code.facebookapi.FacebookJaxbRestClient 

C:\GCode\release-2.0.2\facebook-java-api\src\main\java\com\google\code 
\facebooka 
pi\ExtensibleClient.java:[192,21] inconvertible types 
found   : com.google.code.facebookapi.ExtensibleClient<T> 
required: com.google.code.facebookapi.FacebookJaxbRestClient 

[INFO] 
------------------------------------------------------------------------ 
[INFO] For more information, run Maven with the -e switch 
[INFO] 
------------------------------------------------------------------------ 
[INFO] Total time: 19 seconds 
[INFO] Finished at: Wed Nov 19 12:36:47 GMT+05:30 2008 
[INFO] Final Memory: 16M/44M 
[INFO] 
------------------------------------------------------------------------ 

C:\GCode\release-2.0.2> 

We need to make a small modification in the ExtensibleClient.java at 
#577 to replace doEncode with false. Unfortunately we couldn't do this 
because of this error. 

Your help in identifing the problem is highly appreciated. 

Thanks & Regards, 
ShivaRama Raju. 

Original comment by shivaramaraju on 20 Nov 2008 at 8:43

GoogleCodeExporter commented 8 years ago
it's not encoding it now.. so try out 2.0.3-SNAPSHOT again.  or give me a week 
to get
2.0.3 out.

but please be aware that it still does not work with international characters. 
I have
not been able to talk with anyone from facebook about that..

You could try: HTML encode your caption (using html entities) and clean up your
filename (no weird characters).  I'm holding off on trying this out in the 
library
until I am forced to do so..

Original comment by fern...@gmail.com on 22 Nov 2008 at 6:35