How to pass query string to facebook embedded player url

I am embedding facebook video player into my site.
The url is here

How to pass the value to query string to the facebook url,

<!doctype html>
function getParams() {

    var params = {},
        pairs = document.URL.split('?')

    for (var i = 0, p; i < pairs.length; i++) {
           p = pairs[i].split('=');
           params[ p[0] ] =  p[1];

    return params;
<div id="fb-root"></div><script>(function(d, s, id) {  var js, fjs = d.getElementsByTagName(s)[0];  if (d.getElementById(id)) return;  js = d.createElement(s); = id;  js.src = "//";  fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-video" data-allowfullscreen="1" data-href="">

here I need to change the facebook url by passing the query string.

Source: facebook

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.