Skip to content
This repository has been archived by the owner on Aug 21, 2019. It is now read-only.

Commit

Permalink
added permission scope to request URI
Browse files Browse the repository at this point in the history
#4
Signed-off-by: Bruno Meilick <b@bnomei.com>
  • Loading branch information
bnomei committed May 8, 2017
1 parent cee48f6 commit 6d60a31
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions kirby-instagram-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ function instagramapi($user, $endpoint, $snippet = '', $params = []) {
'https://api.instagram.com/oauth/authorize/',
'?client_id=' . $clientid,
'&response_type=code',
'&scope='.urlencode(c::get('plugin.instagram-api.scope', 'basic')),
'&redirect_uri=' . $redirect, // last!
]);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "kirby-instagram-api",
"description": "Kirby CMS User-Field, Tag and Page Method to access Instagram API Endpoints. This is a boilerplate to create your own Instagram embeds.",
"version": "0.8.0",
"version": "0.9.0",
"type": "kirby-plugin",
"license": "Commercial",
"author": "Bruno Meilick"
Expand Down
8 changes: 8 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,14 @@ You can set these in your `site/config/config.php`.
### plugin.instagram-api.client-secret
- get it from [Instagram Deverloper](https://www.instagram.com/developer/clients/manage/)

### plugin.instagram-api.scope (v0.9+)
- default: `basic`
- set this if you want to request a [different permission scope](https://www.instagram.com/developer/authorization/). Might need an *approved instgram app* not just a *sandbox app*.

```php
c::set('plugin.instagram-api.scope', 'public_content likes');
```

### plugin.instagram-api.default-token
- default: ''
- set this if you want to ommit specifying the token.
Expand Down

0 comments on commit 6d60a31

Please sign in to comment.