huuanh1987 / facebook-java-api

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

Allow session-less api calls to work (ex. friends_get()) #161

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. client = new FacebookJaxbRestClient(fb_sig_api_key, fb_secret);
2. client.friends_get()
3.

What is the expected output? What do you see instead?

I receive a Facebook Exception:

SEVERE: Session key invalid or no longer valid
com.google.code.facebookapi.FacebookException: Session key invalid or no
longer valid 
at
com.google.code.facebookapi.FacebookJaxbRestClient.parseCallResult(FacebookJaxbR
estClient.java:362)
    at
com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:52
6)
at
com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:44
8)
at
com.google.code.facebookapi.ExtensibleClient.friends_get(ExtensibleClient.java:8
12)
at
com.google.code.facebookapi.FacebookJaxbRestClient.friends_get(FacebookJaxbRestC
lient.java:297)

What version of the product are you using? On what operating system?

2.0.4 of the java library

Please provide any additional information below.

The session-less API should work without a fb_sig_session_key

http://wiki.developers.facebook.com/index.php/Category:Session_Optional_API

Original issue reported on code.google.com by ricosre...@gmail.com on 14 Jan 2009 at 3:59

GoogleCodeExporter commented 8 years ago
I'll see if I can make the behaviour more obvious. For the moment, please use
friends_get(Long) and please note that sessionless friends_get() has never 
worked to
my knowledge. Thanks.

Original comment by david.j....@googlemail.com on 14 Jan 2009 at 3:37

GoogleCodeExporter commented 8 years ago
I've made some changes to the "composition" branch that I'm preparing. It's 
easier to
change it than HEAD because the friends_get code is all in one place and is
consistent between Xml, Jaxb and Json. This is because I've changed the caching
behaviour around so that ExtensibleClient is responsible for doing the caching 
and
returning data to the adapters as if the call was really going to Facebook 
(i.e. you
can get cached friends data in JSON or XML format depending on the response type
you're asking for).

I'll make a beta version of the composition branch available soon. In the 
meantime,
please feel free to check out the source and build it yourself.

Original comment by david.j....@googlemail.com on 15 Jan 2009 at 3:03

GoogleCodeExporter commented 8 years ago
Issue 163 has been merged into this issue.

Original comment by david.j....@googlemail.com on 27 Jan 2009 at 9:10

GoogleCodeExporter commented 8 years ago
Hi everyone,

the Issue 163, that was posted by Jez.Chown, and then merged with this one 
still exists.

Coming from a Desktop-Application I get:

com.google.code.facebookapi.FacebookException: Incorrect signature

from the call: client.friends_get(userId) (and most other calls)

The original Issue 163:

What steps will reproduce the problem?

    FacebookJsonRestClient client = new FacebookJsonRestClient(FB_APP_API_KEY,
Androgyny.FB_APP_SECRET);
    client.setIsDesktop(true);

    String token = client.auth_createToken();
    System.out.println("Token: " + token);

    String session = facebookLogin(client, token);
    System.out.println("Session: " + session);

    Long userId = client.users_getLoggedInUser();
    System.out.println("User ID: " + userId);

    System.out.println("Friends: "+client.friends_get(userId));

(facebookLogin does a web browser based login)

What is the expected output? What do you see instead?

    I was expecting to see the result from the friends_get(id)

    Instead it throws:

Exception in thread "main" com.google.code.facebookapi.FacebookException:
Incorrect signature
    at
com.google.code.facebookapi.FacebookJsonRestClient.parseCallResult(FacebookJsonR
estClient.java:346)
    at
com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:52
6)

What version of the product are you using? On what operating system?

    2.0.4 on Win32 

Please provide any additional information below.

    Every function I've tried (apart from users_getLoggedInUser) throws similarly

Since I am trying to make a very simple J2ME-Desktop-Style Application, this
unfortunately halts my progress.

Thanks for looking into it.

Original comment by pko...@gmx.de on 18 Feb 2009 at 4:18

GoogleCodeExporter commented 8 years ago
I get the same pb described in Issue 163 as well trying to build a desktop app, 
even 
with the commented out line:

// String secret = ( isDesktop() && requiresSession ) ? cacheSessionSecret : 
_secret;

I am using a fresh checkout from SVN

Original comment by baolongnt@gmail.com on 1 Mar 2009 at 7:36

GoogleCodeExporter commented 8 years ago
Please post the contents of the facebookLogin(client, token) method. I'm 
writing a
JUnit to try and recreate the problem you're seeing.

Original comment by david.j....@googlemail.com on 1 Mar 2009 at 4:30

GoogleCodeExporter commented 8 years ago
Hi David,

It was just UI around the client.auth_getSession so not so great for a unit 
test.
Here it is for reference, though:

private static String facebookLogin(IFacebookRestClient<?> client, String token)
throws FacebookException
{
    Display display = new Display();
    Shell shell = new Shell();
    shell.setText("Androgyny - Login To Facebook");
    shell.setLayout(new FillLayout());
    shell.setSize(646, 436);
    Browser browser = new Browser(shell, 0);
    browser.setText("<html><body>Please wait...</body></html>");
    browser.setUrl("https://login.facebook.com/login.php?api_key=" + FB_APP_API_KEY +
"&v=1.0&popup=1&auth_token=" + token);
    shell.open();

    while (!shell.isDisposed())
    {
        if (!display.readAndDispatch())
            display.sleep();
    }

    return client.auth_getSession(token);
}

Original comment by Jez.Ch...@gmail.com on 1 Mar 2009 at 4:36

GoogleCodeExporter commented 8 years ago
I've moved the code around a bit and had a play. The error that you're seeing 
happens
whenever the browser doesn't open properly. Please debug your app and make 
absolutely
sure that it's hitting login.facebook.com. I'm pretty certain that's your 
problem.

Anyway, I've also seen that the way auth_getSession works for the JSON, XML and 
JAXB
clients is different. XML was correctly setting the generate_session_secret 
parameter
but the other 2 weren't.

I've checked in a JUnit test *which is set to @Ignore because it opens up a web
browser and I don't want it running for a normal test run*. It's called
Issue161FriendsGetSessionless.java

I've also made changes to the JSON and JAXB clients so that they set
generate_session_secret for desktop applications.

Note that the "composition" branch already has this consistency because
auth_getSession is only implemented once.

Original comment by david.j....@googlemail.com on 1 Mar 2009 at 8:58

GoogleCodeExporter commented 8 years ago
David,

I ran the 'Issue161FriendsGetSessionless' JUnit test out of latest code from 
SVN and 
it fails with the same error as my code.

Any ideas? Can it be an environment thing? I a, running Ubuntu 8.04 and Firefox 
3.0.5

Thanks,

Bao-Long

-------------------------------------------------------------------------------
Test set: com.google.code.facebookapi.Issue161FriendsGetSessionless
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.238 sec <<< 
FAILURE!
testFriendsGetSessionless
(com.google.code.facebookapi.Issue161FriendsGetSessionless)  Time elapsed: 
4.163 
sec  <<< ERROR!
com.google.code.facebookapi.FacebookException: Incorrect signature
    at com.google.code.facebookapi.FacebookJsonRestClient.parseCallResult
(FacebookJsonRestClient.java:351)
    at com.google.code.facebookapi.ExtensibleClient.callMethod
(ExtensibleClient.java:531)
    at com.google.code.facebookapi.ExtensibleClient.callMethod
(ExtensibleClient.java:453)
    at com.google.code.facebookapi.ExtensibleClient.friends_get
(ExtensibleClient.java:822)
    at 
com.google.code.facebookapi.Issue161FriendsGetSessionless.testFriendsGetSessionl
ess
(Issue161FriendsGetSessionless.java:31)

Original comment by baolongnt@gmail.com on 9 Mar 2009 at 6:37

GoogleCodeExporter commented 8 years ago
Hi Bao-Long,

It's extremely likely to be an environmental issue. The reason why the JUnit 
test is
marked with @Ignore is that it uses the "Browser" class to open up a web 
browser to
authenticate the token that you produce. This would be a pain and unreliable 
when
running the whole suite of tests.

Most of the JUnit tests use HttpClient to simulate the web browser interaction 
and so
they can be trusted to be reliable on any platform.

Do you actually get a web browser opened by the JUnit test? Does it say "login
successful, you may close this window"? If not, the token is not getting 
validated
and methods which require a session will not be available.

The "Browser" class works on Windows. Is it failing for Ubuntu?

Thanks,
Dave

Original comment by david.j....@googlemail.com on 9 Mar 2009 at 8:46

GoogleCodeExporter commented 8 years ago
Yes, the browser opens up fine and I do get the message login successful 
message. 
The token, session id and user id get printed out. So it must be something 
else. 

BTW, where is the signature calculated? i.e. in which class?

Thanks,

Bao-Long

Original comment by baolongnt@gmail.com on 9 Mar 2009 at 3:36

GoogleCodeExporter commented 8 years ago
I just ran the JUnit class on Windows (XP + FF 3.0.7). It fails the same way as 
on 
Ubuntu. Firefox opens up. I get the "You may now close this window and return 
to the 
application." message from FaceBook. The token, session id and user id are 
printed 
out but the code fails at fetching the friend list. 

Any ideas?

Original comment by baolongnt@gmail.com on 9 Mar 2009 at 11:57

GoogleCodeExporter commented 8 years ago
The signature is generated by the method generateSignature in the 
ExtensibleClient class.

Can you confirm that you're using the latest 2.1.0 version to test?

Overall, I don't think I can help debug this any further :o(
I've got tens of JUnit tests passing in both my environments (Windows & Linux). 
In
yours, even the most basic methods are failing. Please try to debug the 
callMethod()
method in Extensible client. Stepping through it with your debugger may be the 
only
way to see what's wrong. Get me on Google Talk as dave at daveboden dot com if 
you'd
like help with that. Thanks.

Original comment by david.j....@googlemail.com on 10 Mar 2009 at 8:34

GoogleCodeExporter commented 8 years ago
could it be some sort of default encoding issue?

Original comment by fern...@gmail.com on 10 Mar 2009 at 8:52

GoogleCodeExporter commented 8 years ago
Good suggestion. I just tried:
-Dfile.encoding=UTF-16
on the command line and tried:
Locale.setDefault( Locale.JAPANESE );
as part of the JUnit test

Test still passes for me.

However:
-Dfile.encoding=SJIS
Causes a failure! Good old Japanese Shift-JIS guaranteed to be super-complex and
cause errors ;o)

Good work Fern!

I'll follow up with a couple of JUnit tests and a fix.

Original comment by david.j....@googlemail.com on 10 Mar 2009 at 9:17

GoogleCodeExporter commented 8 years ago
Dave,

I am using the latest code out of SVN trunk.

Actually, I figured out last night that the culprid are these lines in 
ExtensibleClient.generateSignature(). A patch is also attached.

-       // String secret = ( isDesktop() && requiresSession ) ? 
cacheSessionSecret : _secret;
-       String secret = _secret;
+       String secret = ( isDesktop() && requiresSession ) ? 
cacheSessionSecret : _secret;
+       // String secret = _secret;

This was actually noted by Jez.Chown in issue Issue 163 but the fix was never 
applied. The encoding bug must be another one.

No offense but what version / branch are you using in order for the JUnit test 
to 
pass?

Anyway, thanks for trying to help me.

Bao-Long

Original comment by baolongnt@gmail.com on 10 Mar 2009 at 5:25

Attachments:

GoogleCodeExporter commented 8 years ago
Actually, the SJIS file encoding was not causing failures. My mistake.

Right, back to the main thread:

Bao-Long, the fix that you're suggesting isn't correct. I've documented (at 
length!
:o) what Desktop Mode is all about:
http://code.google.com/p/facebook-java-api/wiki/DesktopMode

I produced this lengthy document because the Facebook Desktop Auth 
documentation is
inadequate.

Please take a look at this and see whether you agree with my suggested changes 
and
agree with the concept of what Desktop Auth is all about. Feel free, of course, 
to
make edits wherever you like.

I am, of course, using trunk latest to run JUnit tests. I'd be interested to
understand why you think your suggested fix will work. Does the _secret variable
really not have a value in your environment? If not, I'd be interested to see 
how
you're constructing your Facebook Client to not have anything in _secret. The 
JUnit
test certainly does set a SECRET value.

Original comment by david.j....@googlemail.com on 11 Mar 2009 at 5:50

GoogleCodeExporter commented 8 years ago
Dave,

Thanks for pointing out the doc.  

I see the security concern about having the SECRET in the desktop code but it 
may be
overkill. 

Without getting into how things works under the hood, my observations are that 
the
JUnit test for this bug on a fresh checkout of the trunk fail unless my patch is
applied. Now, I don't in the JUnit test anything about the TEMPORARY SECRET. Am 
I
missing something?

Thanks,

Bao-Long

Original comment by baolongnt@gmail.com on 11 Mar 2009 at 6:38

GoogleCodeExporter commented 8 years ago
I've updated the JUnit test to show debug logs. Please post what you're actually
sending to Facebook and I'll compare it with what I'm sending. It's fine to post
things like friends_get containing your signature. Just don't post your SECRET 
on
this forum, of course!

Original comment by david.j....@googlemail.com on 18 Mar 2009 at 9:02

GoogleCodeExporter commented 8 years ago
For the Invalid Signature issue...

It seems to me that you get this error when you trie to use your SECRET for 
anything
other then generating tokens on a DESKTOP application!

    FacebookJsonRestClient client = new FacebookJsonRestClient(FB_APP_API_KEY,
Androgyny.FB_APP_SECRET);
    client.setIsDesktop(true);

    String token = client.auth_createToken();
    System.out.println("Token: " + token);

    String session = facebookLogin(client, token);
    System.out.println("Session: " + session);

        client = new FacebookJsonRestClient(
                client.getApiKey(),
                client.getCacheSessionSecret(),
                client.getCacheSessionKey());

    Long userId = client.users_getLoggedInUser();
    System.out.println("User ID: " + userId);

Original comment by michael....@gmail.com on 25 Sep 2009 at 3:16

GoogleCodeExporter commented 8 years ago
This issue is old and I believe it's just due to Desktop vs. normal auth mode 
as 
documented on the Wiki. Closing this issue.

Original comment by david.j....@googlemail.com on 13 Jan 2010 at 8:59

GoogleCodeExporter commented 8 years ago
I still get this issue.

A session key is required for calling this method
RequestURI=/login/login

Caused by:

com.google.code.facebookapi.FacebookException: A session key is required for 
calling
this method
    at com.google.code.facebookapi.XmlHelper.parseCallResult(XmlHelper.java:146)
    at com.google.code.facebookapi.XmlHelper.parseCallResult(XmlHelper.java:102)
    at com.google.code.facebookapi.ExtensibleClient.extractLong(ExtensibleClient.java:2283)
    at
com.google.code.facebookapi.ExtensibleClient.users_getLoggedInUser(ExtensibleCli
ent.java:721)
    at
com.google.code.facebookapi.SpecificReturnTypeAdapter.users_getLoggedInUser(Spec
ificReturnTypeAdapter.java:531)
    at com.iqbalconsulting.work.web.OpenIdAction.facebookFriends(OpenIdAction.java:34)
    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:597)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvoca
tion.java:440)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionIn
vocation.java:279)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:242)
    at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(Defau
ltWorkflowInterceptor.java:163)
    at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilt
erInterceptor.java:87)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationIn
terceptor.java:249)
    at
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doInte
rcept(AnnotationValidationInterceptor.java:68)
    at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilt
erInterceptor.java:87)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(Convers
ionErrorInterceptor.java:122)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Parameters
Interceptor.java:195)
    at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilt
erInterceptor.java:87)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Parameters
Interceptor.java:195)
    at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilt
erInterceptor.java:87)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(Static
ParametersInterceptor.java:148)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor
.java:93)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterce
ptor.java:235)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDriven
Interceptor.java:89)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(Scope
dModelDrivenInterceptor.java:128)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at
org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(Profilin
gActivationInterceptor.java:104)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(Debuggin
gInterceptor.java:267)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterc
eptor.java:126)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterc
eptor.java:138)
    at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilt
erInterceptor.java:87)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.ja
va:148)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigI
nterceptor.java:164)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.
java:128)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(Except
ionMappingInterceptor.java:176)
    at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j
ava:236)
    at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)
    at
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperatio
ns.java:77)
    at
org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter.doFilter(StrutsExecu
teFilter.java:76)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1084)
    at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
    at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1084)
    at
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter.doFilter(StrutsPrepa
reFilter.java:65)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1084)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:378)
    at
org.springframework.security.ui.switchuser.SwitchUserProcessingFilter.doFilterHt
tp(SwitchUserProcessingFilter.java:299)
    at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:390)
    at
org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(Filt
erSecurityInterceptor.java:109)
    at
org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(Fi
lterSecurityInterceptor.java:83)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:390)
    at
org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(Ses
sionFixationProtectionFilter.java:67)
    at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:390)
    at
org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(Exceptio
nTranslationFilter.java:101)
    at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:390)
    at
org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFil
terHttp(AnonymousProcessingFilter.java:105)
    at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:390)
    at
org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHt
tp(RememberMeProcessingFilter.java:109)
    at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:390)
    at
org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doF
ilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
    at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:390)
    at
org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(Bas
icProcessingFilter.java:174)
    at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:390)
    at
org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractPr
ocessingFilter.java:277)

Original comment by saee...@gmail.com on 12 Feb 2010 at 2:47

GoogleCodeExporter commented 8 years ago
I am using     <dependency>
    <groupId>com.google.code.facebookapi</groupId>
    <artifactId>facebook-java-api</artifactId>
    <version>3.0.2</version>
</dependency>

Original comment by saee...@gmail.com on 12 Feb 2010 at 2:49

GoogleCodeExporter commented 8 years ago
Getting the same error..any update to this thread why this is happening?

com.google.code.facebookapi.FacebookException: A session key is required for 
calling
this method
    at com.google.code.facebookapi.JsonHelper.parseCallResult(JsonHelper.java:59)
    at com.google.code.facebookapi.ExtensibleClient.extractLong(ExtensibleClient.java:2281)
    at
com.google.code.facebookapi.ExtensibleClient.users_getLoggedInUser(ExtensibleCli
ent.java:721)
    at
com.google.code.facebookapi.SpecificReturnTypeAdapter.users_getLoggedInUser(Spec
ificReturnTypeAdapter.java:531)
    at
com.kickapps.web.interceptor.FacebookInterceptor.preHandle(FacebookInterceptor.j
ava:47)
    at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.j
ava:865)
    at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.ja
va:809)
    at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet
.java:476)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:431)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:290)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
    at
org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.jav
a:125)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:235)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
    at com.kickapps.web.filter.RequestTimer.doFilter(RequestTimer.java:31)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:235)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
    at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(Characte
rEncodingFilter.java:96)
    at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilte
r.java:75)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:235)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    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:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Pr
otocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)

Original comment by rdate...@gmail.com on 26 Apr 2010 at 7:35