This bundle permits to use the bitly api V3
In your config.yml, add this parameters:
av_bitly:
bitly_token: %bitly_token% #mandatory
bitly_api_address: '' #optional, default value = 'https://api-ssl.bitly.com'
bitly_domain: yourdomain #optional, default value = ''
$bitlyService = $this->get('av_bitly.bitly_service');
//generate the bitly url
$shortUrl = $bitlyService->shorten($route);
The functions availables are:
-shorten