We design and analyze solution techniques for a linear-quadratic optimal control problem involving the integral fractional Laplacian. We derive existence and uniqueness results, first order optimality conditions, and regularity estimates for the optimal variables. We propose two strategies to discretize the fractional optimal control problem: a semidiscrete approach where the control is not discretized - the so-called variational discretization approach - and a fully discrete approach where the control variable is discretized with piecewise constant functions. Both schemes rely on the discretization of the state equation with the finite element space of continuous piecewise polynomials of degree one. We derive a priori error estimates for both solution techniques. We illustrate the theory with two-dimensional numerical tests.