I’m working on a small app that uses the Facebook API. What I want to do is show my login/connect to Facebook page the first time the app is launched (or as long as the user has not authenticated.
My primary view is actually a pivot application but I don’t want to show that as long as I don’t have the Facebook acces token. I also want to be able to acces this ‘login’ page from the application bar (it will be the same as the settings page).
Any idea how I can do this?
I would recommend using a custom UriMapper. This allows you to not have to worry about your main page navigating to the login page and then having to manage the navigation stack.
You can read details about this approach here.
To accomplish this, modify the DefaultTask element in the WMAppManifest to navigate to a fake page
Then create a UriMapper class
And last, set the mapper for your application in the Application_Launching event
AND in the Application_Activated event IF the app is tombstoned