send an message on socialemedia when live

Read 124 times
Is it possible to make an automatic announce in socialmedia (facebook twitter instagram or/and whatsapp)
When you go live on sam broadcaster with centovacast?
probem is that you have to trigger the javascript but also, it going to post to a facebook app api page.
Normal feed posts are handled by a series of asp and php pages that are internationally set up to prevent web page injection attacks.

but here is the external post to an app page. its html with a div section for return response from the system:

<body>
      <div id="fb-root"></div>
      <script>
         window.fbAsyncInit = function() {
            // init the FB JS SDK
            FB.init({
               appId      : '496326720437274',                    // App ID from the app dashboard
               channelUrl : '//local.facebook-test/channel.html',  // Channel file for x-domain comms
               status     : true,                                 // Check Facebook Login status
               xfbml      : true,                                  // Look for social plugins on the page
               oauth      : true                                  // Enable oauth authentication
            });

            // Additional initialization code such as adding Event Listeners goes here

            FB.login(function(response)
            {
               if (response.authResponse)
               {
                  console.log(response.authResponse.accessToken);


                  /* SHARE STYLE POST TO WALL - START */
                  // var opts = {
                  //    message : 'Post message',
                  //    name : 'Test post to wall',
                  //    link : 'http://jonmosley.co.uk',
                  //    description : 'Description here',
                  //    picture : 'http://static.dezeen.com/uploads/2013/03/dezeen_Sergio-concept-car-by-Pininfarina_ss_4.jpg'
                  // };
                  // FB.api('/me/feed', 'post', opts, function(response)
                  // {
                  //    if (!response || response.error)
                  //    {
                  //       console.log(response.error);
                  //       alert('Posting error occured');
                  //    }else{
                  //       alert('Success - Post ID: ' + response.id);
                  //    }
                  // });
                  /* SHARE STYLE POST TO WALL - END */


                  /* LARGE PHOTO STYLE POST TO WALL - START */
                  var opts = {
                     message : 'Photo upload',
                     access_token: response.authResponse.accessToken,
                     url : 'http://static.dezeen.com/uploads/2013/03/dezeen_Sergio-concept-car-by-Pininfarina_ss_4.jpg'
                  };

                  FB.api('/me/photos', 'post', opts, function(response)
                  {
                     if (!response || response.error)
                     {
                        console.log(response.error);
                        alert('Posting error occured');
                     }else{
                        alert('Success - Post ID: ' + response.id);
                     }
                  });
                  /* LARGE PHOTO STYLE POST TO WALL - END */

               }else{
                  alert('Not logged in');
               }
            }, { scope : 'publish_stream, user_photos, photo_upload' });

         };

         // Load the SDK asynchronously
         (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/all.js";
            fjs.parentNode.insertBefore(js, fjs);
         }(document, 'script', 'facebook-jssdk'));
      </script>
   </body>