Reputation: 41
How to read the realtime notifications from Facebook graph API in callback URL. Below is the code in my callback url. But I don't get any notifications.
if (Request.HttpMethod == "GET" && Request.QueryString["hub.challenge"] != null)
{
Response.Clear();
Response.Write(Request.QueryString["hub.challenge"].ToString());
Response.End();
}
else if (Request.HttpMethod == "POST")
{
StreamReader reader = new StreamReader(Request.InputStream);
string jsonString = reader.ReadToEnd();
}
Upvotes: 0
Views: 391
Reputation: 31479
Have you created a subscription in the way that is described in the docs here https://developers.facebook.com/docs/graph-api/real-time-updates/#subscribing?
Check your existing Subscriptions like this:
GET /{app-id}/subscriptions
as described here: https://developers.facebook.com/docs/graph-api/reference/app/subscriptions/#read
Have you implemented some logging for the GET and POST requests, so that you know if requests occur?
Upvotes: 1