Skip to content

Instantly share code, notes, and snippets.

@dokipen
Created October 29, 2014 21:02
Show Gist options
  • Select an option

  • Save dokipen/d474bb75a1cf54bffc6a to your computer and use it in GitHub Desktop.

Select an option

Save dokipen/d474bb75a1cf54bffc6a to your computer and use it in GitHub Desktop.
import java.util.HashMap;
import org.json.JSONArray;
import com.embedly.api.Api;
...
Api api = new Api('Mozilla/5.0 (compatible; mytestapp/1.0; my@email.com)');
HashMap<String, Object> params = new HashMap<String, Object>();
params.put('url', 'http://www.youtube.com/watch?v=sPbJ4Z5D-n4&feature=topvideos');
JSONArray oembed = api.oembed(params);
String oembedHTML = oembed.getString("html")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment