Permalink
Browse files

fix rush.

  • Loading branch information...
1 parent 74a2c6a commit 626b63ab4ef7d2c8914b9abd1887a7a33d34bc9c @jubishop committed Jul 30, 2009
View
2 ApplicationBase.as
@@ -25,7 +25,7 @@ package {
public class ApplicationBase extends WindowedApplication {
// Our app id
- public static const AppID:Number = 62972033868;//75647677556;
+ public static const AppID:Number = 75647677556;
public function ApplicationBase() {
layout = "absolute";
View
2 fb/FBAPI.as
@@ -37,7 +37,7 @@ package fb {
public class FBAPI {
private static const restURL:String =
- "http://api.keito.devrs003.facebook.com/restserver.php";
+ "http://api.inyour.facebook.com/restserver.php";
private static var auth_token:String;
private static var session_key:String;
View
6 fb/FBConnect.as
@@ -130,6 +130,9 @@ package fb {
if (grantedPage.publish_stream == 1)
adminnedPages.push(grantedPage.uid);
+ Output.bug(resultsByKey);
+ Output.bug("fql adminned pages:", adminnedPages);
+
// If we found out we can in fact administer this page
// then just fire the event to say so.
if (canAdminPage(Number(requesting_page))) {
@@ -147,9 +150,12 @@ package fb {
}
private static function adminDialogClosed(event:FBEvent):void {
+ Output.bug("admin dialog closed", event.data);
// Loop thru and add all those permissions we've gotten
if (event.data) adminnedPages.push(event.data);
+ Output.bug("adminned pages", adminnedPages);
+
requesting_page = null;
dispatcher.dispatchEvent(new FBEvent(FBEvent.PAGE_PERMISSION_CHANGED));
}
View
4 fb/display/FBDialog.mxml
@@ -61,7 +61,7 @@
private static const MINIMUM_HEIGHT:int = 8;
public static const FacebookURL:String =
- "http://www.keito.devrs003.facebook.com";
+ "http://www.inyour.facebook.com";
public static const NextPath:String = FacebookURL +
"/connect/login_success.html";
@@ -106,6 +106,8 @@
}
public function hide(a_result:* = false):void {
+ if (!visible) return;
+
// If any listener to CLOSING calls preventDefault()
// Then we don't close.
var closingEvent:FBEvent = new FBEvent(FBEvent.CLOSING);
View
3 fb/display/FBPagePermDialog.as
@@ -30,9 +30,10 @@ package fb.display {
}
override public function hide(a_result:* = false):void {
+ Output.bug("hide value", a_result);
// If we're hiding with a value, override that
// value and insert our page_id
- if (a_result) super.hide(page_id);
+ if (a_result) super.hide(Number(page_id));
else super.hide(false);
}
}
View
2 fbair.mxml
@@ -156,7 +156,7 @@
// Now we call this to init our application.
// Always call this only once, in the applicationComplete callback.
- FBConnect.init('f280ddc63bb3bf30823518bdf62ffb94');//39f0aec9479177cddacef90da714b037');
+ FBConnect.init('39f0aec9479177cddacef90da714b037');
// This function checks to see if we're already connected
statusChanged();
View
1 fbair/composer/Composer.mxml
@@ -105,6 +105,7 @@
// Called when the user is done hopefully validating our pages
// extended permission.
private function pagePermissionChange(event:FBEvent):void {
+ Output.bug("page permission change!", NileContainer.CurrentFilter);
if (FBConnect.canAdminPage(Number(NileContainer.CurrentFilter))) {
Output.bug("can admin now!");
FBAPI.callMethod("stream.publish", {
View
5 fbair/nile/NileContainer.mxml
@@ -327,8 +327,11 @@
Output.assert(nile != null, "Adding status message with no nile?");
// Into the newsfeed dataCache and currentfilter...
dataCache["nf"].addItem(storyData);
- if (CurrentFilter != "nf")
+ if (CurrentFilter != "nf") {
+ if (!dataCache[CurrentFilter])
+ dataCache[CurrentFilter] = new ArrayCollection();
dataCache[CurrentFilter].addItem(storyData);
+ }
// Mark immune, then give to NewsFeed and CurrentFilter
// NileRenderers own their data with logic so each
View
2 fbair/notification/ToastManager.as
@@ -64,7 +64,7 @@ package fbair.notification {
"recipient_id = " + FBConnect.session.uid + " " +
"and is_unread = 1 " +
"and sender_id != recipient_id " +
- "and created_time > " + Math.round(Fetcher.updateTime / 1000) + " "
+ "and created_time > " + Math.round(Fetcher.updateTime / 1000) + " " +
"limit " + int(ToastManager.MAX_DISPLAY_BATCH_ALERT_TOAST + 1);
// If this isn't the first time on startup, also query for inboxes
View
16 fbair/util/ProfileCache.as
@@ -105,13 +105,14 @@ package fbair.util {
// Set an event listener to request these at end of frame
Application.application.addEventListener(
Event.ENTER_FRAME, fetchProfiles);
-
+
// We put all our requests into a queue to fire at end of frame
if (! queuedRequests[profileID]) {
var dispatcher:EventDispatcher = new EventDispatcher();
queuedRequests[profileID] = dispatcher;
}
+ // Return dispatcher for this specific profileID
return queuedRequests[profileID];
}
@@ -128,19 +129,25 @@ package fbair.util {
cached_requests[request_id] = queuedRequests[request_id];
else uncached_requests[request_id] = queuedRequests[request_id];
}
-
+
var uncached_ids:Array = new Array();
for (var uncached_request_id:String in uncached_requests)
uncached_ids.push(uncached_request_id);
+ // Clear our list of queued requests, for next time
+ queuedRequests = new Object();
+
// If we have some uncached, then request them from the server.
if (uncached_ids.length > 0) {
var jsonLoader:JSONLoader = FBAPI.callMethod("fql.query", {
query:"select id, name, pic_square, " +
"url from profile where id in " +
"(" + uncached_ids.join(", ") + ")"
});
- if (!jsonLoader) return;
+ if (!jsonLoader) {
+ Output.error("Call to profile table returned error!");
+ return;
+ }
jsonLoader.addEventListener(FBEvent.SUCCESS,
function(event:FBEvent):void {
var results:Array = event.data as Array;
@@ -164,9 +171,6 @@ package fbair.util {
for (var cached_id:String in cached_requests)
cached_requests[cached_id].dispatchEvent(
new FBEvent(PROFILE_FETCHED, cache[cached_id]));
-
- // Clear our list of queued requests now that we're done
- queuedRequests = new Object();
}
// Save preferences at end

0 comments on commit 626b63a

Please sign in to comment.