zaloplatform / zalo-php-sdk

MIT License
61 stars 41 forks source link

Update ZaloConfig #5

Open tienthanh2509 opened 6 years ago

tienthanh2509 commented 6 years ago

Make ZaloConfig passing secret and appid to PHP library like python library instead of manual edit src/ZaloConfig.php

Hard code in library is not good.

https://github.com/zaloplatform/zalo-python-sdk

from zalo.sdk.app import ZaloAppInfo, Zalo3rdAppClient

zalo_info = ZaloAppInfo(app_id=your app id, secret_key="your app secret", callback_url="put your callback url here")
zalo_3rd_app_client = Zalo3rdAppClient(zalo_info)
tienthanh2509 commented 6 years ago

ZaloConfig is a Singleton???

Why we don't passing directly

       $zalo = new Zalo([
            'app_id' => 'xxx',
            'app_secret' => 'yyy',
            'oa_id' => 'zzz',
            'oa_secret' => 'www'
        ]);

into Zalo instance?