7

Do you know whether there's an API to query my subscribers and/or subscriptions?

bkaid
  • 51,465
  • 22
  • 112
  • 128
vyakhir
  • 1,714
  • 2
  • 17
  • 21
  • 2
    Please elaborate on what work you've put into finding the answer yourself. – brc Sep 20 '11 at 13:27
  • 1
    Maybe I'm just out of touch with FB, but what is a "subscriber" or "subscription" in that context? – Matt Ball Sep 20 '11 at 13:28
  • 1
    @MattBall It's a new feature, much like an RSS feed of a user's updates. read more http://bits.blogs.nytimes.com/2011/09/14/facebook-allows-people-to-subscribe-to-friends/ – Casey Sep 20 '11 at 13:48
  • 1
    why is this voted down? It's a legitimate question. – Yuliy Sep 20 '11 at 16:04
  • @brc He's looking for a method to do it, you can't really document a negative. – Tim Post Sep 21 '11 at 06:15

3 Answers3

12

It's undocumented, but it seems to be /userId/subscribers. And you would need user_subscriptions extended permissions as shown below. In fact, using the Graph API explorer is how I learned subscriptions were in fact available. I haven't found the subscriptions method yet, as /me/subscriptions is invalid as that is for applications and real-time update subscriptions.

Update: still undocumented, but it seems to be /userId/subscribers and /userId/subscribees

user_subscriptions

bkaid
  • 51,465
  • 22
  • 112
  • 128
  • 7
    Needs more arrows. Definitely needs more arrows. – Tim Post Sep 21 '11 at 06:16
  • I'm trying to get access to subscriptions, too; anything new to report here? I noticed that the permission that Graph API Explorer is asking for is "Subscribers and Subscribees", but when I try /me/subscriptions with Explorer, it returns an "This method must be called with an app access_token", even though I provided one. Maybe it's almost sorta kinda working? – Jim Miller Nov 01 '11 at 01:14
  • @Jim Miller try /me/subscribers and /me/subscribees – bkaid Nov 01 '11 at 04:11
  • can we do it with the scope ? – Aysennoussi Nov 26 '14 at 21:04
2

Get subscriptions from the subscriptions table with FQL:

SELECT subscribed_id FROM subscription WHERE subscriber_id = me()

Use FQL multiquery to get the subscription names as well:

query1: SELECT subscribed_id FROM subscription WHERE subscriber_id = me() 
query2: SELECT name, uid FROM user WHERE uid IN (SELECT subscribed_id FROM #query1)

You need the user_subscriptions permission for this query.

Gunnar Karlsson
  • 28,350
  • 10
  • 68
  • 71
0

As OffBySome noted, you can get your own subscribers with the user_subscriptions permission (using me/subscribers), but not whom you are subscribed to, nor, more importantly any of the people's posts that you are subscribed to as they are not in your home feed. From experience, I would say that the Graph API is lagging behind the onslaught of new features. Normally it catches up after a few weeks.

DavidAWalsh
  • 927
  • 7
  • 7