Skip to content

Instantly share code, notes, and snippets.

@letswritetw
Created February 8, 2021 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save letswritetw/64884e0ad79515980538b8ad52e44b91 to your computer and use it in GitHub Desktop.
Save letswritetw/64884e0ad79515980538b8ad52e44b91 to your computer and use it in GitHub Desktop.
ig-oembed
var appId = '從 FB 後台取得的「應用程式編號」';
var secret = '從 FB 後台取得的「應用程式密鑰」';
var uri = 'https://graph.facebook.com/oauth/access_token?client_id=' + appId + '&client_secret=' + secret + '&grant_type=client_credentials';
function doGet(e) {
var response = UrlFetchApp.fetch(uri);
return ContentService.createTextOutput(response).setMimeType(ContentService.MimeType.JSON);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment