r7231 - in dumbhippo/trunk/server/src/com/dumbhippo: server/impl web/servlets
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r7231 - in dumbhippo/trunk/server/src/com/dumbhippo: server/impl web/servlets
- Date: Thu, 17 Jan 2008 16:14:09 -0600 (CST)
Author: marinaz
Date: 2008-01-17 16:14:09 -0600 (Thu, 17 Jan 2008)
New Revision: 7231
Modified:
dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FacebookTrackerBean.java
dumbhippo/trunk/server/src/com/dumbhippo/web/servlets/FacebookServlet.java
Log:
Facebook doesn't actually include the sesion key in the request when the user is uninstalling the application.
Modified: dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FacebookTrackerBean.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FacebookTrackerBean.java 2008-01-17 21:38:52 UTC (rev 7230)
+++ dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FacebookTrackerBean.java 2008-01-17 22:14:09 UTC (rev 7231)
@@ -215,7 +215,12 @@
}
}
- facebookAccount.setSessionKey(sessionKey);
+ // don't reset the session key if the application is being uninstalled,
+ // because we might still be able to use it to get the updates for the user on Mugshot
+ // (not sure if the session key will still be valid though, but if it's not,
+ // we'll just reset it when we try to make a request next time)
+ if (applicationEnabled == null || applicationEnabled)
+ facebookAccount.setSessionKey(sessionKey);
if (sessionKey != null)
facebookAccount.setSessionKeyValid(true);
if (applicationEnabled != null)
@@ -706,7 +711,7 @@
fbmlSb.append("</fb:wide>");
fbmlSb.append("<fb:narrow>");
- for (int i=1; i<=55; i++ ) {
+ for (int i=1; i<=75; i++ ) {
fbmlSb.append(" ");
}
fbmlSb.append("</fb:narrow>");
Modified: dumbhippo/trunk/server/src/com/dumbhippo/web/servlets/FacebookServlet.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/web/servlets/FacebookServlet.java 2008-01-17 21:38:52 UTC (rev 7230)
+++ dumbhippo/trunk/server/src/com/dumbhippo/web/servlets/FacebookServlet.java 2008-01-17 22:14:09 UTC (rev 7231)
@@ -178,7 +178,6 @@
} else if (facebookParams.get("fb_sig_uninstall") != null && facebookParams.get("fb_sig_uninstall").toString().equals("1")) {
// we would get this request if the user uninstalls our application, but Facebook doesn't expect a response for it
// get the user who owns the related FacebookResource
- String sessionKey = facebookParams.get(FacebookParam.SESSION_KEY.toString()).toString();
String facebookUserId = facebookParams.get(FacebookParam.USER.toString()).toString();
IdentitySpider identitySpider = WebEJBUtil.defaultLookup(IdentitySpider.class);
FacebookTracker facebookTracker = WebEJBUtil.defaultLookup(FacebookTracker.class);
@@ -189,7 +188,7 @@
if (user != null) {
userViewpoint = new UserViewpoint(user, Site.MUGSHOT);
// TODO: can change this into updateExistingFacebookAccount
- facebookTracker.updateOrCreateFacebookAccount(userViewpoint, sessionKey, facebookUserId, false);
+ facebookTracker.updateOrCreateFacebookAccount(userViewpoint, null, facebookUserId, false);
}
} catch (FacebookSystemException e) {
errorMessage = e.getMessage();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]