Facebook的流API - Java库 [英] Facebook streaming API - java library

查看:99
本文介绍了Facebook的流API - Java库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有以这种方式使用Facebook的流API的Java库:

Is there any java library for using the facebook's streaming API in this manner:


  • 订阅流(设置回调URL)

  • 解析输入流更新信息

  • 查询Facebook的API(按照previous步骤)得到什么改变

RestFB和Facebook4j不能做到这一点。

RestFB and Facebook4j can't do that.

推荐答案

我有同样的问题,可以找到一个支持它,部分。这是春天Facebook的社交以及与Spring集成社交

I had the same problem and could find one that supports it, partially. It is Spring Social Facebook, and integrates with Spring Social.

它有一个从Facebook处理实时更新回调的实时更新控制器,但RealTimeUpdate类是Facebook发布请求体映射到仅与用户对象suscriptions兼容。

It has a real-time update controller for handling real-time update callbacks from Facebook, but the RealTimeUpdate class it maps Facebook post request body to is only compatible with User object suscriptions.

这是因为弹簧类条目只属于用户suscriptions属性changed_fields,但是当它是一个页面suscription它返回称为改变对象的数组。春天社会Facebook并没有这个数组中的进入类,所以对于网页suscriptions你需要改变codeA位(这是我必须做看起来是)。

This is because the spring class Entry only has the attribute changed_fields that belong to user suscriptions, but when it is a page suscription it returns an array of objects called changes. Spring Social Facebook does not have this array in the Entry class, so for page suscriptions you would need to change the code a bit (which is what I'll have to do it seems).

在Facebook的文档不介绍的属性这些变化的对象可以有,但你可以找到关于它的更多信息<一个href=\"https://stackoverflow.com/questions/24916963/list-of-possible-changes-values-in-facebook-realtime-update\">here.

The Facebook documentation does not describe the properties those changes objects can have, but you can find more information about it here.

这篇关于Facebook的流API - Java库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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