Skip to content

@shobhitsharma shobhitsharma released this Oct 30, 2020

  • Fixed support for new oEmbed endpoints recently released by Facebook's Graph API
  • To embed facebook or instagram posts, it is required to set access_token property globally or in single instance. This will automatically injected to all embed URLs called with the embedo's instance. No breaking changes.
// facebook initialize options
new Embedo({
  facebook: {
    appId: {your-app-id},
    access_token: {your-app-id|your-client-token}
  }
});

// instagram initialize options
new Embedo({
  instagram: {
    access_token: {your-app-id|your-client-token}
  }
});

PR: #26 / bundle-size: 6.9kb / demo: codepen

Assets 2

@shobhitsharma shobhitsharma released this Nov 20, 2019

Overriding SDK

// Custom SDK Format
new Embedo({
  [source: string (facebook/twitter/...)]: {
    sdk: string
  }
})

// Example for override facebook SDK
new Embedo({
  facebook: {
   sdk: "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2"
  }
})

Ref: PR #19 and #20. Also, see options for more details.

Assets 2
Nov 20, 2019
Override SDK Configuration (#20)
* Added codeowners config

* Update CODEOWNERS

* Updated facebook default sdk and added possibility of overriding as 'sdk' option

@shobhitsharma shobhitsharma released this Jan 8, 2019

  • update Added Embedo.plugins([ ... plugins ]) to initialize multiple plugins during init for es6 or AMD modules.
import Embedo from 'embedo'
import withEmbedoReddit from 'embedo/plugins/reddit'
import withEmbedoGmaps from 'embedo/plugins/gmaps'
import withEmbedoFlickr from 'embedo/plugins/flickr'

// Then, load plugins
Embedo.plugins([ withEmbedoGmaps, withEmbedoReddit, withEmbedoFlickr ])

// OR works as HOC
withEmbedoReddit(Embedo)

// Then init Embedo instance
Embedo.init({ ..., reddit: true, googlemaps: { ... } })

Try it on codesandbox demo here.

  • patch Fixed instagram embed by adding embedding as iframe as fallback. Due to recent changes with instagram API, they broke their own embed system, but if you add suffix /embed after post/photo URL, it can embed as iframe, see example here.

  • Added Flickr plugin

Assets 2
Jan 8, 2019
Jan 8, 2019
Pre-release
Pre-release

@shobhitsharma shobhitsharma released this Jan 8, 2019

  • To embed instagram as iframe alternative, don't use jsonp as boolean, but use undefined or null instead. Apart, resizing iframe itself is not feasible to detect autoheight. I suggest to use iframe-resizer if you need to have auto-detected heights of embed element. Once issue with instagram is resolved, pass jsonp: true|false with load options based on your case.
Assets 2
Jan 8, 2019

@shobhitsharma shobhitsharma released this Jan 7, 2019

  • feature Added Domify: .domify() New method that embeds the content to dom with options set using html elements, see usecase here.
  • feature Added Plugins: Integrated extensions that re-uses embedo base class to build plugins based on external sources, see an example here with react.
  • new Added plugins for Google Maps and Reddit, see here.
  • update Disintegration google maps source from core to plugins. You only need to import the plugin in order to make it backward compatible by either loading gmaps script in dom or importing through module and passing Embedo instance to it, as shown here.
  • update Code refactoring and cleanup.
Assets 2

@shobhitsharma shobhitsharma released this Jan 7, 2019

  • update Removed googlemaps from core and move to plugins as an add-on on top of embedo class instance in next release.
  • fix Fixed error handling during jsonp fetch
Assets 2