Oembed endpoint returning different JSON results if given a callback parameter

Q: The oembed endpoint is returning different json results if given a callback parameter:

http://api.embed.ly/1/oembed?url=https%3A%2F%2Fwww.facebook.com%2Fembedly%2Fposts%2F543635339027843 gives a "rich" embed. 
http://api.embed.ly/1/oembed?url=https%3A%2F%2Fwww.facebook.com%2Fembedly%2Fposts%2F543635339027843&callback=test gives a "link" embed.

 

A: The problem here is that some sites return a script tag which cannot be 
rendered via jsonP, so we switch the embed out.

If you want the script tag in the callback you can add allowscripts=true to 
your api call: 

http://api.embed.ly/1/oembed?url=https%3A%2F%2Fwww.facebook.com%2Fembedly%2Fposts%2F543635339027843&callback=test&allowscripts=true

Here is a list of query arguments:

http://embed.ly/docs/arguments

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk