设置一个 cron 任务来解析朋友在 Facebook 上的签到
我想设置一个 cron 作业来登录我的 Facebook 帐户,获取我朋友的最新签到信息,然后导出包含该信息的 JSON 文件,以便我(和其他人)可以在其他地方使用它。由于我没有服务器端脚本编写的经验,您认为这可能吗?什么是合适的技术?我尝试使用 Python SDK 并且我还查看了 FBCMD 和 miniFB< /a> 但我在使用硬编码到脚本的帐户信息创建会话时遇到了最大的困难 - 所有其余的似乎并不难实现。
如果有人能指出我正确的方向,我将非常感激!
I want to setup a cron job that logs in to my facebook account, takes the latest checkin information for my friends, and then exports a JSON file with that information, so that I (and others) could use it somewhere else. As I have no experience with server-side scripting, do you think that this is possible? What would be an appropriate technology? I tried to use the Python SDK and I also had a look to FBCMD and miniFB but I'm having most difficulties in creating a session with my account info hardcoded to the script - all the rest doesn't seem that hard to implement.
I'd really appreciate it if anyone could point me to the right direction!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不是我的问题的确切答案,而是解决同一问题的更清晰、更复杂的方法。
Facebook 在其 Graph API 上支持“实时更新”:
这在我的例子中起到了作用,不需要使用 crontab 或类似的东西。
This is not an exact answer to my question, but a cleaner and more elaborate way to solve the same problem.
Facebook supports "Real-time updates" on their Graph API:
That did the trick in my case, without the need to use crontab or anything similar.