Until recently, graph.facebook.com/username would return a JSON object containing the numeric ID. Facebook has restricted most unauthenticated access, but legacy apps still have limited visibility.