* Produces the Facebook SDK object for the passed in callback. * * Note: Facebook SDK fails to render multiple plugins when the SDK is only * loaded in one frame. To Allow the SDK to render them correctly we load the * script per iframe. * * @param {!Window} global * @param {function(!Object)
(global, cb, locale)
| 29 | * @param {string} locale |
| 30 | */ |
| 31 | function getFacebookSdk(global, cb, locale) { |
| 32 | loadScript( |
| 33 | global, |
| 34 | 'https://connect.facebook.net/' + locale + '/sdk.js', |
| 35 | () => { |
| 36 | cb(global.FB); |
| 37 | } |
| 38 | ); |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * Create DOM element for all Facebook embeds. |
no test coverage detected