Yuichi Nakano
Yuichi Nakano

Reputation: 179

Facebook Graph API subscribing to user threads

I'm trying to receive realtime updates of user threads via graph api(2.x), and I work around with Graph API Explore posting a request like below to make a subscription;

 https://graph.facebook.com/v2.1/MY_FB_ID/subscriptions

# with these params

 access_token: MY_VALID_ACCESS_TOKEN
 object: user
 fields: threads
 verify_token: foo-bar
 callback_url: http://example.com/callbacks

then I get this error:

{
  "error": {
    "message": "(#100) Application cannot subscribe to notifications", 
    "type": "OAuthException", 
    "code": 100
  }
}

And when I change threads with name, for example, it returns this response.

{
  "error": {
    "message": "(#2201) response does not match challenge, expected value = '1872122487', received='<!doctype html>\n<htm...'", 
    "type": "OAuthException", 
    "code": 2201
  }
}

I think this error is good because Facebook API accepts a request and try to verify the server to send notifications exists and setup correctly, but the first one is not good apparently.

So what's odd is both threads and name are listed as valid fields for user object on the document, but only threads is not accepted. https://developers.facebook.com/docs/graph-api/real-time-updates/v2.0#subscribefields

Any idea about what is wrong with this. I should not do this on explore? Or it's not even possible to subscribe user threads via graph api?

Thanks in advance.

Upvotes: 1

Views: 334

Answers (1)

Yuichi Nakano
Yuichi Nakano

Reputation: 179

I found we cannot receive realtime updates of user/threads unless being whitelisted by facebook, at least for now.

Upvotes: 1

Related Questions