Code Monkey home page Code Monkey logo

facebook-asp.net-webhook's Introduction

Retrieving facebook leads using ASP.NET Web API and Graph API Webhooks

ASP.NET way of retrieving Facebook Lead Ad data

Prerequisites

  • Facebook developer account
  • Visual Studio 2015 or higher

Web API Implementation

  • Compile and host the Web API in your server
    Note: SSL Certificate is mandatory. Facebook accept only https URL.

  • When an lead ad is generated facebook will post the data to the Web API's Post action.
    api

  • Following data is avaliable in the API
    post_data

Facebook App & Webhook Configuration

  • Navigate to https://developers.facebook.com

  • Choose Add a New App from the My Apps pull-down menu
    Add facebook app

  • Provide the display name, contact email address and click Create App ID
    New app

  • Navigate to Add Product and setup Webhook
    add product
    webhook

  • Select Page from the pull-down menu and click Subscribe to this topic
    subscription

  • Provide the callback URL (Note: SSL is mandatory), Verification Token and click Verify and Save
    subscription_config

  • On successfull verification you will be prompted with a list of avaliable subscriptions. From the list subscribe to Leadgen
    ledgen_subscribtion
    subscription_confirmation

  • To test the working without creating a lead ad do the following

    • Cick Test button in the leadgen subscription
      test_leadgen
    • Facebook will open-up a popup with sample data, click Send to My Server button.
      sample_data
    • If there is any valid method like sending email, writing to database etc is implemented in the API post will get executed.

License

This project is licensed under the MIT License

facebook-asp.net-webhook's People

Contributors

somaraj avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.