Facebook Webhook通知当某人喜欢我的页面或喜欢或在我的页面上发表评论时



我有一个产品网站和该产品的Facebook页面。

1。是否可以通过Facebook Webhook以任何格式获取页面或发布喜欢/评论数据的页面?

2.使用Webhook是否需要创建Facebook应用程序?

public override void ProcessRequest(HttpContext context)
    {
        try
        {
            for (int i = 0; i < context.Request.QueryString.Count; i++)
            {
                System.IO.File.AppendAllText(Server.MapPath("~") + "//Documents//Logs//APILog.txt", context.Request.QueryString[i]);
            } 
            if (context.Request.QueryString[2] == "My_new_token")
                context.Response.Write(context.Request.QueryString[1]);
        }
        catch (Exception ex)
        {
           System.IO.File.AppendAllText(Server.MapPath("~") + "//Documents//Logs//APILog.txt", "Exception:" + ex.Message);
        }
    }

最新更新