-1

I have used the below link to set the subscription for facebook application: https://graph.facebook.com/v2.2/MY_APP_ID/subscriptions?callback_url=MY_CALLBACK_URL?object=user&fields=feed&verify_token=MY_VERIFICATION_CODE&access_token=My_App_ID|MY_APP_SECRET

For this I am getting empty json object: { "data": [`` ] }

Please any one help me to set the subscription for my facebook application and to get the realtime updates from facebook.

phwd
  • 19,975
  • 5
  • 50
  • 78
Ram
  • 51
  • 1
  • 1
  • 2

1 Answers1

0

It looks like you are sending a HTTP GET request instead of a HTTP POST request.

The HTTP GET request will return the subscriptions that app has, which seems to be none. You need to first create a subscription to your callback_url by using a POST request instead.

phwd
  • 19,975
  • 5
  • 50
  • 78
  • I am sending post request to the facebook and facebook server is calling my callback_url through GET request. It is always returning the "{ "error": { "message": "(#2201) response does not match challenge, expected value = '2074165530', received='Mode: subscribe & ch...'", "type": "OAuthException", "code": 2201 } }" as a response please suggest us to get the realtime updates from the facebook. – Ram Dec 23 '14 at 06:39
  • @Ram challenge you are sending via `verify_token` isn't being matched in your callback url code. – phwd Dec 23 '14 at 15:04