0
我也在開發一個名爲xfFB的開發項目,它基於iOS上的Facebook SDK 4。我把下面的代碼作爲本機庫進行登錄:使用Facebook iOS開發ANE 4.16.1 SDK for Adobe Air mobile,任何成功的故事?
[self dispatchEvent:@"LOGIN_IN_PROGRESS" withMessage: @"iOS login to facebook..."];
FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
[login
logInWithReadPermissions: permissions fromViewController:nil // block below is either not executed or not interacting with the actionscript.
handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
if (error) {
NSLog(@"Process error");
[xfFB dispatchEvent:failed withMessage:[error localizedDescription]];
} else if (result.isCancelled) {
NSLog(@"Cancelled");
[xfFB dispatchEvent:success withMessage:@"CANCEL"];
} else {
NSLog(@"Logged in");
NSString *jsonString =[self obj2Json: (NSObject *)result];
[xfFB dispatchEvent:success withMessage: jsonString];
}
}];
的代碼確實實醒原生應用程序,但只是單純地回到我的AS3應用,但不執行的處理程序塊。我想知道fb 4.x SDK是否可以與ActionScript集成,因爲它需要負責太多的控制,讓應用程序本身參與進程。有人有一個例子嗎?
要小心處理接收到的調用,不僅是url,還要選項鍵。現在,當正確的選項密鑰傳遞給代理時,代碼塊內的代碼被執行。這應符合fb sdk文檔 –