Open GoogleCodeExporter opened 8 years ago
Incredible since I ran into the same problem and I had to implement a
synchronized
hash map indexed by sessionid containing all the clients. And this class has to
be a
listener for session events (in web.xml) in order to clear expired session's
facebook
clients from this hash map.
Objects in session should be serializable and simple (POJOs). The facebook
client in
its turn, could receive this POJO as an argument for its construction. Much
more clean.
Original comment by darioand...@gmail.com
on 8 Dec 2009 at 11:00
Could you provide an example of this as a quick fix for this issue?
Thanks,
Tuomas
Original comment by tuomas.r...@gmail.com
on 16 Dec 2009 at 4:08
I think it's a bad idea to put FacebookJsonRestClient into a session. Why do
you need
that?
Original comment by rdmytre...@gmail.com
on 22 Dec 2009 at 6:06
Why is that? Could you explain, because the example saves it in to a session.
How the
login informatin should be saved then?
Original comment by tuomas.r...@gmail.com
on 5 Jan 2010 at 2:22
Hi Tuomas,
If we're talking about regular Facebook app (FBML or iframe based), you will
always
have all needed parameters. if you have FbConnect application you need only
"session_key" as I understand (you can research junit tests to get idea).
"session_key" is a string and you can easy put it to session. You also will not
waste
your server memory with large objects like FacebookJsonRestClient.
Original comment by rdmytre...@gmail.com
on 5 Jan 2010 at 9:55
Thanks.
Maybe this issue should be changed to "fix the example"..
// When initializing the facebook connection get the session key from POST
parameter
String sesskey = request.getParameter("fb_sig_session_key");
session.setAttribute(FACEBOOK_USER_SESSION_KEY, sesskey);
// When creating the FacebookXmlRestClient again from session data
String sessionkey = (String)session.getAttribute(FACEBOOK_USER_SESSION_KEY);
new FacebookXmlRestClient(api_key, secret, sessionkey);
Original comment by tuomas.r...@gmail.com
on 6 Jan 2010 at 2:04
Hi Thomas,
Does the proposed solution
String sessionkey = (String)session.getAttribute(FACEBOOK_USER_SESSION_KEY);
new FacebookXmlRestClient(api_key, secret, sessionkey);
only apply to desktop applications, since the documentation seems to indicate
that web based applications should no be concerned with the 'sessionkey'.
Original comment by paul.t.oconnell@gmail.com
on 1 Sep 2010 at 8:25
Original issue reported on code.google.com by
sujithpv...@gmail.com
on 1 Dec 2009 at 9:36