Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support of new instagram and facebook api #26

Merged
merged 1 commit into from
Oct 30, 2020

Conversation

shobhitsharma
Copy link
Owner

@shobhitsharma shobhitsharma commented Oct 30, 2020

What?

Facebook Graph API introduced new oembed endpoints which includes access_token parameter, for both server and client side embeds. Developers manually have to generate those token and use in respective apps/websites based on format {app-id}|{client-token}. See docs below for more info:

🎉 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 other 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}
  }
});

Why?

Closes #25

Screenshots

Requests 200 OK

Screenshot 2020-10-30 at 20 43 07

Screenshot 2020-10-30 at 20 43 23

Embed Test Screenshots

Screenshot 2020-10-30 at 20 42 43

Screenshot 2020-10-30 at 20 46 54

Screenshot 2020-10-30 at 20 47 07

@shobhitsharma shobhitsharma merged commit 50b2e0f into master Oct 30, 2020
@shobhitsharma shobhitsharma deleted the feat--fb-oembed-upgrade branch October 30, 2020 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

embedo dosen't work now, FB/IG seemd change the API
1 participant