【发布时间】:2021-05-26 20:37:34
【问题描述】:
我设法使用 API 安排了 Facebook 帖子,但如何安排 Instagram 帖子?
这是安排在 Facebook 上发帖。为了能够做到这一点,您必须使用:
published: false,
scheduled_publish_time: convertedtime
所以我在下面使用上面的代码来安排时间。
FB.api('/' + pageId + '/photos', 'post', {
message :facebooktexten,
link : lanken,
url : bildUrl,
access_token : aToken,
published: false,
scheduled_publish_time: convertedtime
}, function(response) {
if (!response || response.error) {
app.dialog.alert('Error occured'+response.error);
} else {
}
});
但是当我尝试为 Instagram 做同样的事情时,它会直接发布到 Instagram。 首先我获取容器 ID,然后使用该容器 ID 发布。但我应该有
published: false,
scheduled_publish_time: convertedtime
当我请求容器 ID 或发布它时?
FB.api('/' + instagramId + '/media?image_url='+bildUrl+'&caption='+instagramtexten, 'post', {
published: false,
scheduled_publish_time: convertedtime
}, function(response) {
if (!response || response.error) {
app.dialog.alert('Error occured'+response.message);
} else {
//first I get the container Id here----
console.log('Media Container ID: '+response.id)
FB.api('/' + instagramId + '/media_publish?creation_id='+response.id, 'post', {
published: false,
scheduled_publish_time: convertedtime
}, function(response) {
if (!response || response.error) {
app.dialog.alert('Error occured'+response.message);
} else {
console.log('It is posted!!!')
}
});
}
});
或者您如何安排到 Instagram? 另外,我在哪里可以看到 Facebook 中的预定帖子? 我以为我会在您看到所有帖子的业务页面中看到它,但我在那里看不到?也许是因为我的应用仍在审核中?
【问题讨论】:
-
“或者您如何安排到 Instagram?” – 您可以开始查阅 API 文档,以确定您想要的是否是甚至作为一种可能性提供(而不是相当天真地假设它“必须”。)
-
哈哈我的天!你认为我一直在做什么?你以为我是怎么得到上面的代码的!!耶稣!是的,根据有关 Instagram API 的最新消息,这是可能的!
-
那么这些最新消息在哪里,链接?
-
这是一个链接,上面说您可以通过 API 安排发布到 Instagram 的时间。 developers.facebook.com/blog/post/2021/01/26/…
-
我可以看到developers.facebook.com/docs/instagram-api/guides/… 只提到了一次“计划”这个词,它所指的其他端点描述似乎根本没有提到这个话题。猜猜你必须问 Facebook,这应该如何工作,resp。实际记录在哪里。