How to set callback_url to facebook subscription to get facebook realtime updates using java graph api?

181 views Asked by At

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.

1

There are 1 answers

2
phwd On

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.