使用Cron发布到Facebook页面墙 [英] Publishing to Facebook Page wall using Cron

查看:265
本文介绍了使用Cron发布到Facebook页面墙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我们的客户在工作中的一个想法,以便能够预先发布元素到他们的Facebook页面墙。这使得他们可以推送文章和状态更新一次,而CRON作业将做实际工作与发布到墙上。

I'm working on an idea I had for our clients at work to be able to publish elements to their Facebook page wall in advance. That allows them to push articles and status updates once, while a CRON job would do the actual work with posting to the wall.

我已经阅读了关于 offline_access 在Facebook API中弃用,现在您可以获得一个扩展的长期访问代码。但是,我不太确定我如何使用访问代码来运行CRON作业,每时每刻。

I've read about the offline_access deprecation in the Facebook API, and that you now get an extended long-lived access code. However, I'm not quite sure how I could use the access code to run a CRON job every now and then.

有没有人有一个线索如何登录和

Does anyone have a clue on how to login and post to Facebook page as a CRON job?

推荐答案

您可以做什么创建一个页面,客户端可以计划所有他们的帖子。当他们访问该网站,请他们登录到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.

这篇关于使用Cron发布到Facebook页面墙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆