22 Feb 2012 12:10 PM #1
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
Everything 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 ?
22 Feb 2012 12:48 PM #2
- Join Date
- Mar 2007
- St. Louis, MO
- Vote Rating
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
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 email@example.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.
22 Feb 2012 1:42 PM #3
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.
22 Feb 2012 8:15 PM #4
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!
23 Feb 2012 2:40 PM #5
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...