12. Given a line $l$ passing through point $P(0,1)$ with a slope of $k$ intersects the hyperbola $C: x^{2}-\frac{y^{2}}{3}=1$ at points $A$ and $B$.
(1) Find the range of values for $k$;
(2) If $F_{2}$ is the right focus of the hyperbola $C$, and $\left|A F_{2}\right|+\left|B F_{2}\right|=6$, find the value of $k$.
12. (1) Let the line $l: y=k x+1$, and by combining with the hyperbola equation, we get
$$
\left(3-k^{2}\right) x^{2}-2 k x-4=0 \text {. }
$$

Since the line $l$ intersects the hyperbola $C$ at two distinct points, we have
$$
\left\{\begin{array}{l}
3-k^{2} \neq 0, \\
\Delta=4 k^{2}+16\left(3-k^{2}\right)>0
\end{array}\right.
$$
$\Rightarrow-23$ (discard)
$\Rightarrow k= \pm 1$.
When $30$,
$\left|A F_{2}\right|+\left|B F_{2}\right|=\left|2 x_{1}-1\right|+\left|2 x_{2}-1\right|$
$=\left|\left(2 x_{1}-1\right)+\left(2 x_{2}-1\right)\right|=2\left|x_{1}+x_{2}-1\right|$
$=2\left|\frac{2 k}{3-k^{2}}-1\right|$.
Given $\left|A F_{2}\right|+\left|B F_{2}\right|=6$
$\Rightarrow 2\left|\frac{2 k}{3-k^{2}}-1\right|=6$
$\Rightarrow k=-2$ or $\frac{3}{2}$ or $\frac{1 \pm \sqrt{13}}{2}$ (all do not meet the conditions,
discard).

In summary, the value of $k$ is 1 or -1.