Skip to content

Add support for DevTokens #24

@ben-kn-app

Description

@ben-kn-app

The content of this issue isn't meant to be complete, just as a quick reference for some who are looking to get this to work with a Developer Token.

In the Feedly class (Feedly.php), I have added a custom function storeDevToken (see below), it injects the developer token you can get from https://feedly.com/v3/auth/dev

public function storeDevToken($devToken) {
            $response = new AccessTokenResponse(
                array(
                    'access_token' => $devToken,
                    'expires_in' => (time()+(30 * 24 * 60 * 60)))
            );

            $this->accessTokenStorage->store($response);

            return $response;
}

Then I can access the content from my account, bypassing the oauth altogether: (see above link how to get this token)

$clientSecret = "YourAccessToken";
$feedly = new feedly\Feedly(new feedly\Mode\DeveloperMode(), new feedly\AccessTokenStorage\AccessTokenSessionStorage());
$feedly->storeDevToken($clientSecret);
$model = $feedly->profile();
$response = $model->fetch();
print_r($response);

Hope it saves someone else some time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions