how to put the total score for quiz application to share by facebook?

I have a program which is quiz question for Facebook and I have the total score and I have the share part, how can I put the total score for this application to be shared when they click on share button.
and that is the variable for total score:

 if(!strcmp($array1[$z],$array2[$z])) {
     $totalCorrect=$totalCorrect+20;
 }

This is my script for sharing:

<script>
    (function(d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src =    "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3&appId=1006983675986171";
        fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));
</script>


Source: facebook

Leave a Reply