23

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.

sakibmoon
  • 2,026
  • 3
  • 22
  • 32
Chris S
  • 385
  • 1
  • 8
  • I spotted someone having a similar problem in the facebook forum on the Realtime update thread http://forum.developers.facebook.net/viewtopic.php?pid=366327#p366327 Possible bug? – Chris S Sep 07 '11 at 10:52
  • Did you log it as a bug? – DMCS Dec 29 '11 at 23:02
  • 2
    Please file this as a bug in the FB Bug Tracker and I'll make sure it get's looked at. – Matthew Johnston Feb 16 '12 at 13:49
  • I've seen this over and over again... Not so realtime... But if you try to imagine to complexity and current notifications to be sent you will understand :) – jribeiro Feb 19 '12 at 22:25
  • Hi, I ended up implementing this in a different way so I no longer have the test code or able to validate a fix - is it still worth filing? – Chris S Feb 28 '12 at 07:32
  • Big apps like FB and Twitter run on the "Eventually Consistent" principle... :) – Andrew Grothe May 09 '12 at 16:03

1 Answers1

1

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!

Elmor
  • 4,775
  • 6
  • 38
  • 70
  • Thanks. The orig. plan was to connect users to FB, download their info we needed from the graph API and subscribe to any updates of that info. Since that failed due to the bug/issue I asked the question about, we instead dynamically look up the info when the user visits. Slower, but makes sure the data is accurate and works fine. – Chris S May 14 '12 at 01:34