开发者

Application Early Flush JSON Format

The Facebook developer app has a field called "Early Flush" that tells Facebook to load your static resources right away for Canvas Applications. For example, your style.css and/or javascript.js files. It requires JSON format, but I can't figure out for the life of me what format its looking for. I've tried all sorts of variations of [] and {}. The old discussion forums indicates it needs to be in this format, but this doesn't make sense nor does it work. http://forum.developers.fac开发者_开发技巧ebook.net/viewtopic.php?id=91799

[{
    "name":"All", 
    "pattern":".*", 
    "resources":
        ["http://www.myapp.com/resource.css", 
         "http://www.myapp.com/flash.swf"]
}]

Can anyone tell me how to format this so that Facebook loads my style.css and javascript.js files quickly?


Take a look at the Canvas Prefetching section of this document:

https://developers.facebook.com/docs/reference/javascript/

I think what you need is FB.Canvas.Prefetcher.addStaticResource

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜