Ejemplo n.º 1
0
        public async void StartLogin(
            )
        {
            FBSession s = FBSession.ActiveSession;

            // Assumes the Facebook App ID and Windows Phone Store ID have been
            // saved in the default resource file.
            ResourceLoader rl = ResourceLoader.GetForCurrentView();

            String appId    = rl.GetString(FBAppIDName);
            String winAppId = rl.GetString(FBPhoneAppIDName);


            // IDs are both sent to FB app, so it can validate us.
            s.FBAppId  = appId;
            s.WinAppId = winAppId;

            // These are the default permissions, needed to retrieve user info.
            s.AddPermission("public_profile");
            s.AddPermission("user_friends");
            s.AddPermission("user_likes");

            // Launches a URI to redirect to the FB app, which will log us in
            // and return the result via our registered protocol.
            await s.LoginAndContinue();
        }