且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用Cron发布到Facebook页面墙

更新时间:2023-12-02 17:49:40

您可以做什么创建一个页面,客户端可以计划所有他们的帖子。当他们访问该网站,请他们登录到Facebook,您可以在其中获得 access_token 在cron中使用。

What you can do it create a page where the client can "schedule" all their post on. When they access the website, ask them to login to facebook where you can get a access_token for use in cron.

按照离线访问指南,为此获取长期访问令牌目的。这将让您获得访问页面的长久 access_token 。您将需要使用cron中的长期页面 access_token 来发布计划的帖子 - 该位与进行常规API调用相同,但使用页面访问令牌。

Follow the Offline Access Guide to get a long-lived access token for this purpose. This will let you get a long-lived access_token for Page access too. You will need to use the long-lived page access_token in the cron to publish the scheduled posts - that bit is the same as making a regular API call, but using a page access token instead.