infusionsoft / API-Sample-Code

Sample API Code for various Languages
35 stars 86 forks source link

Call to undefined method stdClass::getRefreshToken() #10

Closed ghost closed 8 years ago

ghost commented 8 years ago

$token = serialize(json_decode('{"accesstoken":"**","token_type":"bearer","expires_in":28800,"refreshtoken":"**","scope":"|****.infusionsoft.com"}'));

$infusion = new \Infusionsoft\Infusionsoft([
   'clientId' => '******',
    'clientSecret' => '******',
    'redirectUri' => 'www.example.com',
]);

$infusion->setToken(unserialize($token));

$infusion->refreshAccessToken(); // causing error

$contact = $infusion->contacts()->findByEmail('****@hotmail.com',['FirstName','LastName']);

var_dump($contact);

whats the deal?

kressaty commented 8 years ago

Hey @matthebs - not sure what you're asking here, and since this repo doesn't support the Oauth process this is probably the wrong place to post your question. You can always open a support ticket via the developer portal, or post an issue with a clear explanation and steps to reproduce on the PHP SDK repo.

thedangler commented 8 years ago

@kressaty Sorry, I'm very confused because I installed it using composer from your main page in git and it shows it using the OAuth so why doesn't it.

The instructions stay php-SDK and refer to Oauth? What am I missing?

kressaty commented 8 years ago

Oh - you want to be posting here: https://github.com/infusionsoft/infusionsoft-php