Skip to content

Commit 167c81d

Browse files
author
Eric Koleda
authored
Update sample to use the new public getToken() method.
1 parent 1a69d9b commit 167c81d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/Wordpress.gs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var CLIENT_SECRET = '...';
77
function run() {
88
var service = getService();
99
if (service.hasAccess()) {
10-
var blogId = service.getToken_().blog_id;
10+
var blogId = service.getToken().blog_id;
1111
var url = 'https://public-api.wordpress.com/rest/v1.1/sites/' + blogId + '/posts';
1212
var response = UrlFetchApp.fetch(url, {
1313
headers: {
@@ -63,4 +63,4 @@ function authCallback(request) {
6363
} else {
6464
return HtmlService.createHtmlOutput('Denied');
6565
}
66-
}
66+
}

0 commit comments

Comments
 (0)