Facebook login example

Hi I need some help with implementing the code of the facebook login example to a new project

I wanted to place the login button on a once-seen splash page (SplashScreen.ux), and when you successfully log in you’re redirected to a main page (MainView.ux). I placed the ux stuff in SplashScreen.ux and copypasted the javascript in a fb.js file.

I tried both linking it in the .unoproj file and by a ux:Global file inside the app tag. All I ever get is these errors:

{showVebView} not found in data context

{hasProfile} not found in data context

{hasProfile} not found in data context

{login} not found in data context

alert is not defined

Hi Claudio,

those errors are just warnings and they are in no way related to the Facebook challenge you’re asking about. That last one though - your JS file has a call to alert() at the end of it, and there’s no function called like that in it.

As for the question you’re asking, I believe you need to first follow the Tutorial to understand how to work with JavaScript files in Fuse. In short, you want to :Bundle them and then require() in your viewmodels.