Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support wechat open platform. #532

Merged
merged 2 commits into from
Dec 1, 2016
Merged

Add support wechat open platform. #532

merged 2 commits into from
Dec 1, 2016

Conversation

mingyoung
Copy link
Collaborator

Add a configuration.

@mingyoung
Copy link
Collaborator Author

mingyoung commented Dec 1, 2016

new Application([
...
'open_platform' => [
                'app_id' => 'component_appid',
                'access_token' => 'component_access_token'
            ],
])

@@ -46,6 +46,7 @@ public function register(Container $pimple)
$socialite = (new Socialite(
[
'wechat' => [
'open_platform' => $pimple['config']['open_platform'],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该要检查是否存在 open_platform,因为不是大家都用开放平台

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在socialite那里WechatProvider->isOpenPlatform() 检测了下

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没,我是说 PHP 会报 undefined index open_platform

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好像不存在open_platform会返回null,会报错吗?😳

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

哦,对,$pimple['config'] 是对象,那没问题

@overtrue overtrue merged commit 202a7c3 into w7corp:master Dec 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants