Closed kxgio closed 8 years ago
Thanks for the PR!
I think this would be better if we could send in an all new $config array so that different apps could use different options (like different versions of Graph for example). You can just array_merge()
the existing config so that it will fallback to the original instance config for unspecified options.
Also the method should be named newInstance()
and return a new instance of itself:
return new static($config);
Hey @kxgen! Just wanted to check in with you to see if you'd be able to update your PR based on my feedback. If not, l can get in there and make the patch. :)
Hi @SammyK , sorry to reply you so late, I just follow your guide and change the update method. So now we can use something like this to update app info:
$new_config = ['app_id' => 'you_app_id', 'app_secret' => 'you_app_secret'];
$fb->newInstance($new_config)->post('things you want to do');
right?
Thanks @kxgen! Just change based on my comments and it should be good to pull in. :)
:)
Thanks! :)
usage: $fb = App::make('SammyK\LaravelFacebookSdk\LaravelFacebookSdk'); $fb->updateAppIdSecret('your_app_id', 'your_app_secret');