安装运行 composer.phar install,添加 vhost 指向公共目录,运行 ./bin/console generate:html /path/to/service.json public,添加配置:// config/config.php 返回数组:

array(

'roles' => array(

'role' => array(

'base_url' => 'http://api.example.com',

'consumer_key' => 'consumer_key',

'consumer_secret' => 'consumer_secret',

'token' => 'token',

'token_secret' => 'token_secret'

)

)

);