Can a flash game using the Facebook Graph API be posted on flash portals?
So I made a flash game utilising the Facebook Graph API on the we开发者_运维技巧ekend (www.throwthelookingglass.com/ld21 for the game and source code), and I'm wanting to put a version on it on various flash portals, but still allow the user to login to their facebook account.
Is this possible?
So far, I've tried uploading the game to Kongregate, but with little luck - every time I get the error:
SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller http://chat.kongregate.com/gamez/0012/2744/preview/Escape.swf?kongregate_game_version=1314001567 cannot access http://www.kongregate.com/games/pdyxs/escape-from-flatland-an-adventure-of-two-dimensions_preview. at flash.external::ExternalInterface$/initJS() at flash.external::ExternalInterface$/addCallback() at com.facebook.graph::Facebook/init() at com.facebook.graph::Facebook$/init() at Escape/created() at Escape/__Escape_Application1_creationComplete() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.core::UIComponent/set initialized() at mx.managers::LayoutManager/doPhasedInstantiation() at mx.managers::LayoutManager/doPhasedInstantiationCallback()
Any help here would be greatly appreciated.
You are going to run up against portals that do not enable javascript or External Interface by setting the AllowScriptAccess property to none. Also, you are not going to be able to recieve the signed response from facebook nless the page explicity passes it to you.
So in short, no. You can't.
Though i really wish facebook would make flash a 1st class citizen and allow this sort of thing over HTTP. But they cannot do that because Flash cannot be an OAuth client.
精彩评论