1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    4
    Vote Rating
    0
    roje is on a distinguished road

      0  

    Default Facebook API integration in minified javascript

    Facebook API integration in minified javascript


    Hi,

    I integrated the facebook API with my sencha touch 2 aplication following the hints in this thread : http://www.sencha.com/forum/showthread.php?131361-Post-to-Facebook-wall-from-Sencha-Touch-App&p=735764

    E
    verything runs fine when developing and using sencha-touch-debug and app.js files. But when I minify the app with the SDK tools, I get a js error telling "Uncaught ReferenceError: FB is not defined".

    Could it be because of the minification process ?
    Anyone has an idea ?

    Thanks,
    Roje.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,672
    Vote Rating
    748
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Would think the facebook class isn't being included in the build. You can check the jsb3 file to see if you find the JS file your facebook class is in is present.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    4
    Vote Rating
    0
    roje is on a distinguished road

      0  

    Default


    Thanks for the answer.

    The facebook class is not included in the build, since it is loaded asynchronously. But this may not be the best way to include it... So I created a js file containing the facebook API and included this file as a resources. I think this is not a long-term solution.

    But for now it works correctly.

    Thank you.

  4. #4
    Sencha User lorezyra's Avatar
    Join Date
    Dec 2007
    Location
    Japan -- 日本
    Posts
    527
    Vote Rating
    3
    lorezyra will become famous soon enough

      0  

    Default


    Maybe you should report this as a bug for the SDK tools...
    Perfection as a goal is a nice idea that can point one in a specific direction. However, since "perfection" is an ever changing (evolving?) and moving target, one must admit that perfection can never be obtained...

    When in doubt, check the d4mn source code!

  5. #5
    Sencha User
    Join Date
    Aug 2011
    Posts
    4
    Vote Rating
    0
    roje is on a distinguished road

      0  

    Default


    Well I'm not sure it's a bug, since I didn't ask the sdk to include the facebook API in the build...
    Maybe I'm not using this the right way...

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar