javascript - Custom CKEditor Oembed consumer callback is invalid in Symfony -
i using latest ckeditor cdn 4.5.4. trying implement custom oembed consumer described here http://docs.ckeditor.com/#!/api/ckeditor.config-cfg-embed_provider
i using symfony endpoint retrieving oembed information. reach url http://localhost/oembed/?url=https://www.facebook.com/someecards/posts/987699161267010&callback=ckeditor._.jsonpcallbacks[78]
the url
, callback
provided me ckeditor , far understand, callback cannot altered.
i using https://github.com/oscarotero/embed succesfully sorts of links. problem how choose return data symfony.
if choose send response text string, works, on embeds facebook, include <script>
tags getting processed , altering return. ideally use proper jsonp
method symfony provides this...
$response = new jsonresponse($this->payload, 200, array()); $response->setcallback($callback); return $response;
however when this, told symfony...
invalidargumentexception in jsonresponse.php line 77: callback name not valid.
so ckeditor._.jsonpcallbacks[78]
valid jsonp callback? there can around this? reason effort in first place iframe.ly, default ckeditor oembed consumer, not handle facebook embeds. maybe same reason.
Comments
Post a Comment