- Share this text:
Report Abuse
- By djmarkitos on 17th June 2020 01:36:02 AM
function Giphy() {
var acceso = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
var api = "http://api.giphy.com/v1/gifs/random?tag=funny+cat&api_key=dc6zaTOxFJmzC&limit=1";
var response = UrlFetchApp.fetch(api);
var json = response.getContentText();
var data = JSON.parse(json);
// Logger.log(data.data.images.downsized_large.url); para probar las llamadas
var captura = (data.data.images.downsized_large.url);
UrlFetchApp.fetch("https://graph.facebook.com/v2.1/me/feed",{
muteHttpExceptions:true,
method:"post",
payload:{
method:"post",
link:captura,
access_token:acceso
}
});
}