3 Replies Latest reply on Dec 26, 2013 4:33 AM by Daniel Sterchi

    Facebook JavaScript SDK(al.js) include error

    alam_84 Level 1

      HI All,

       

      I am planning to integrate facebook with my InDesign plugin.

      In my plugin I have a button "Share On facebook" clicking it will share a post on user wall.

      To achieve this i read faceboook-developer tutorial and download JavaScript facebook SDK from http://connect.facebook.net/en_US/all.js

      and saved it locally and try to include this in my code as follows

      ------------------------------------------------------------------------------------------ --------------------------

      #include "all.js"

      FB.init({ appId: xxxxxxx, status: true, cookie: true, xfbml:true });

      ------------------------------------------------------------------------------------------

      But When I ran the above script in ExtendScriptToolkit then it gives compilation error for all.js

      I also tried to convert all.js to its binary equivalent by open all.js in extendscripttoolkit and do File > Export As binary but it gives same error.

       

      Please help me to fix all.js compilation issue.

       

      Regards,

      Alam

        • 1. Re: Facebook JavaScript SDK(al.js) include error
          Daniel Sterchi Adobe Community Professional

          Hi

           

          Trough my point of view you try to execute JavaScript commands in the scripting engine of InDesign but the commands you executing are most centainly for the scripting engin of webbrowsers. You have to find a way to combine these two scripting engines. I don't know if this is possible.

           

          kind regards

           

          Dani (from Switzerland)

          • 2. Re: Facebook JavaScript SDK(al.js) include error
            alam_84 Level 1

            HI Daniel,

             

            Yes you are right and it is not possible to integrate two scripting engine.

            can you tell me a way using which I can convert all.js script file to its binary equivalent .

             

            Regards,

            Alam

            • 3. Re: Facebook JavaScript SDK(al.js) include error
              Daniel Sterchi Adobe Community Professional

              Hi Alam

               

              Because  JavaScripts are meant for a specific engines there is no such thing as a JavaScript binary executable on your operating system.

              Years ago iI connected InDesign to a server using JavaScript sockets. This was a showcase  just to show what is possible. Be sure not to violate the license agreement.

              I dont know if that would work for you.

               

              If you where on a Mac there is the possibility to work with applescript. Because applescript runs also on OS X there you could possibly connect InDesign to browser output. I’v never tried that though.

              Screen Shot 2013-12-26 at 13.21.14.png

              Kind Regards

               

              Dani (from Switzerland)