isudakoff / yii2-foursquare-authclient
Foursquare 扩展,通过 yii2-authclient 使用
1.0.1
2017-08-24 09:22 UTC
Requires
- yiisoft/yii2-authclient: ~2.0@dev
This package is auto-updated.
Last update: 2024-09-29 04:42:43 UTC
README
此扩展为 yii2-authclient 添加了 Foursquare OAuth2 支持。
安装
安装此扩展的首选方式是通过 composer。
运行以下命令之一:
php composer.phar require --prefer-dist isudakoff/yii2-foursquare-authclient "*"
或
"isudakoff/yii2-foursquare-authclient": "*"
将以下内容添加到 composer.json 的 require
部分。
使用方法
您必须阅读 yii2-authclient 的 文档
在 Foursquare 中注册您的应用程序 (Foursquare)
并将 Foursquare 客户端添加到您的认证客户端中。
'components' => [ 'authClientCollection' => [ 'class' => 'yii\authclient\Collection', 'clients' => [ 'foursquare' => [ 'class' => 'isudakoff\authclient\Foursquare', 'clientId' => 'foursquare_app_id', 'clientSecret' => 'foursquare_app_secret', ], // other clients ], ], // ... ]