public static function getAuthorizationButton(
        $client_id,
        $redirect_url,
        $state = '',
        $text = 'connect',
        $color = 'blue',
        $caption = 'white',
        $size = 200,
        $url = 'https://runkeeper.com/apps/authorize'
    ) {
        $link = self::getAuthorizationLink($client_id, $redirect_url, $state);
        $text = (in_array($text, array('connect', 'login'))) ? $text : 'connect';
        $color = (in_array($color, array('blue', 'grey', 'black'))) ? $color : 'blue';
        $caption = (in_array($caption, array('white', 'black'))) ? $caption : 'white';
        switch ($size) {
            case '300':
                $size = '300x57';
                break;

            case '600':
                $size = '600x114';
                break;

            default:
                $size = '200x38';
                break;
        }
        $image = "http://static1.runkeeper.com/images/assets/$text-$color-$caption-$size.png";
        $button = array(
            'link' => $link,
            'image' => $image,
            'html' => "<a href='$link'><img src='$image' /></a>",
        );
        return $button;
    }