r7226 - dumbhippo/trunk/server/src/com/dumbhippo/server/impl



Author: marinaz
Date: 2008-01-17 14:27:57 -0600 (Thu, 17 Jan 2008)
New Revision: 7226

Modified:
   dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FacebookTrackerBean.java
Log:
Fix a NullPointerException.

Modified: dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FacebookTrackerBean.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FacebookTrackerBean.java	2008-01-17 20:06:06 UTC (rev 7225)
+++ dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FacebookTrackerBean.java	2008-01-17 20:27:57 UTC (rev 7226)
@@ -220,7 +220,9 @@
 		    facebookAccount.setSessionKeyValid(true);	
 	    if (applicationEnabled != null)
 	        facebookAccount.setApplicationEnabled(applicationEnabled);
-	    if (applicationEnabled)
+	    // if you enabled Mugshot application on Facebook, you must have agreed to the Mugshot
+	    // terms of use there
+	    if (applicationEnabled != null && applicationEnabled)
 	    	facebookAccount.getExternalAccount().getAccount().setHasAcceptedTerms(true);
 	    
 		// make sure the sentiment is LOVE; there is currently no way to unset it from the user interface,
@@ -698,19 +700,19 @@
 		// <fb:action> tag doesn't work inside <fb:visible-to-owner>,
 		// so we need to use the following barbaric methods to right align the 'Edit Account' action 
 		fbmlSb.append("<fb:wide>");	
-		for (int i=1; i<=37; i++ ) {
+		for (int i=1; i<=38; i++ ) {
 		    fbmlSb.append("&nbsp;");
 		}
 		fbmlSb.append("</fb:wide>");	
         		
 		fbmlSb.append("<fb:narrow>");	
-		for (int i=1; i<=9; i++ ) {
+		for (int i=1; i<=13; i++ ) {
 		    fbmlSb.append("&nbsp;");
 		}
 		fbmlSb.append("</fb:narrow>");
 	
 		fbmlSb.append("<fb:fbml version='1.1'><fb:visible-to-owner><a href='http://apps.facebook.com/"; + applicationName +"?mugshot_tab=home' style='float:right;'>Edit Accounts</a>" +
-                      "| <a href='http://apps.facebook.com/"; + applicationName +"?mugshot_tab=invite' style='float:right;'>Invite Friends</a>" +
+                      " | <a href='http://apps.facebook.com/"; + applicationName +"?mugshot_tab=invite' style='float:right;'>Invite Friends</a>" +
 		              "</fb:visible-to-owner></fb:fbml></fb:subtitle>");
 
 		// add the accounts ribbon



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]