FB实时API不/不一致地通知某些连接(音乐,电影,书籍,电视) [英] FB Realtime API not/inconsistently notifying for certain connections (music, movies, books, tv)

查看:174
本文介绍了FB实时API不/不一致地通知某些连接(音乐,电影,书籍,电视)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在遇到Facebook的实时API问题。



我希望订阅用户个人资料中的一些内容,包括他们的喜欢在音乐,书籍,电视和电影类别中。



当我通过FQL和Graph查询时,我获得正确的信息,但是当Facebook没有ping通知端点时条目在用户个人资料中更改。



订阅和验证均正常。这是从我的应用程序从Facebook的活跃订阅:

  [object] => string(4)user
[callback_url] => <正确回调URL> / facebook / update /
[fields] =>数组(11){
[0] => string(13)birthday_date
[1] => string(5)books
[2] => string(10)first_name
[3] => string(7)friends
[4] => string(5)喜欢
[5] => string(6)电影
[6] => string(5)music
[7] => string(4)name
[8] => string(3)sex
[9] => string(2)tv
[10] => string(8)username
}
[active] => bool(true)
pre>

起初我还没有订阅喜欢,但是添加一下,看看它是否修复了问题。 。没有。



文档说:


以下是您可以订阅的用户连接列表:feed,friends,activities,兴趣,音乐,书籍,电影,电视on,like,checkins


当任何数据更改时,我收到通知(包括朋友),它只是音乐书籍电影电视



也许更奇怪的是,当我喜欢一个随机的Facebook页面使用类似按钮,而不是将其添加到我的个人资料中的一个字段)我收到字段触发的通知。当我不像同一页面时,我会收到喜欢音乐书籍触发的通知电影电视



不用说,我很困惑。有没有人遇到这个或可以建议一个地方开始寻找解决它?



编辑:经过进一步的测试,我发现通知发生在某些情况下,而不是其他情况。例如如果您喜欢该乐队页面上的乐队,则会发送通知。如果您从编辑个人资料页面编辑您喜欢的音乐,则不会发送通知。所以这听起来像一个错误。

解决方案

不完全是答案,但仍然...



几个月前,我被赋予一个修复Facebook应用程序的任务。
它使用Facebook提供的信息来构建统计数据。但政策发生变化,Facebook停止提供该信息。



我已经使用图形和fql来获取该信息。
Grahp api是愉快的,因为你不必注册+答案是json格式。
主要的问题是Graph api是soooooo慢....



让我给你一个帮助我的提示:fql是非常相似的sql和也许你应该尝试一些本机的功能或其他方法。



谁知道!


I'm currently running into an issue with Facebook's realtime API.

I wish to subscribe to a number of things on a users profile, including their "Likes" in the Music, Books, TV and Movies categories.

I get the correct information when I query via FQL and the Graph, but Facebook is not pinging my notification endpoint when those entries change on a users profile.

The subscription and verification are fine. Here is the active subscription from Facebook from my App:

["object"]=> string(4) "user"
  ["callback_url"]=> <correct callback URL>/facebook/update/"
  ["fields"]=>array(11) {
    [0]=> string(13) "birthday_date"
    [1]=> string(5) "books"
    [2]=> string(10) "first_name"
    [3]=> string(7) "friends"
    [4]=> string(5) "likes"
    [5]=> string(6) "movies"
    [6]=> string(5) "music"
    [7]=> string(4) "name"
    [8]=> string(3) "sex"
    [9]=> string(2) "tv"
    [10]=> string(8) "username"
  }
  ["active"]=> bool(true)

At first I had not subscribed to likes but added that on to see if it fixes the problem... It has not.

The documentation says:

Here are the list of user connections to which you can subscribe: feed, friends, activities, interests, music, books, movies, television, likes, checkins

I get notification when any of that data changes (including friends), it's just the music, books, movies and television.

Perhaps even more strangely, when I "Like" a random Facebook page (i.e. using a like button, not adding it to a field on my profile) I get a notification triggered on the like field. When I unlike the same page, I get a notification triggered on likes, music, books, movies and television!

Needless to say, I'm confused. Has anybody run into this or can suggest a place to start looking to fix it?

EDIT: After some further test I've discovered that the notification occurs under some conditions but not others. e.g. if you like a band from that band's page there will be a notification sent. If you edit your music likes from your "edit profile" page there will not be a notification sent. So this sounds like a bug.

解决方案

Not exactly the answer, but still ...

Couple of months ago i was given a task to fix a facebook app. It used information provided by facebook to build statistics. But policies changed and facebook stopped providing that info.

I've used graph and fql to obtain that information. Grahp api is pleasant, because you don't have to be registered + the answer is in json format. The main problem is that Graph api is soooooo slow....

Let me give you a hint that helped me: fql is very alike sql, and maybe you should try some functions or other methods which are native to sql.

Who knows!

这篇关于FB实时API不/不一致地通知某些连接(音乐,电影,书籍,电视)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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