Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook API to query my subscriptions/subscribers

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

like image 985
vyakhir Avatar asked Sep 20 '11 13:09

vyakhir


2 Answers

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

like image 185
bkaid Avatar answered Sep 28 '22 06:09

bkaid


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.

like image 39
onosendai Avatar answered Sep 28 '22 08:09

onosendai