Skip to content
Related Articles
Open in App
Not now

Related Articles

Integrating Facebook Like & Share Plugin Using Django

Improve Article
Save Article
  • Last Updated : 16 Feb, 2021
Improve Article
Save Article

Django is a Python-based web framework that allows you to quickly create efficient web applications. It is also called batteries included framework because Django provides built-in features for everything including Django Admin Interface, default database – SQLlite3, etc.  In this article we will learn to integrate facebook comment plugin in django.

How to Integrate Facebook Like & Share Plugin in Django ?


pip install django

1) Create new project

django-admin startproject Test_prj

2) Navigate to Test_prj directory

cd Test_prj

3) Create new app

python startapp main

Folder Structure :

Then add the app name inside the  INSTALLED_APPS (


from django.shortcuts import render
# Create your views here.
def home(request):
    return render(request,"main/index.html")

Create new file inside the main directory


from django.urls import path
from .views import *
urlpatterns = [

Add the main/ inside the


from django.contrib import admin
from django.urls import path,include
urlpatterns = [

Go to this link to get code

Click on get code

Create new directory  templates inside the main app inside that create main directory



<!DOCTYPE html>
    <div id="fb-root"></div>
    <script async defer crossorigin="anonymous" 
    <h1>Welcome To GFG</h1>
    <div class="fb-like" data-href="" data-width=""
         data-layout="button_count" data-action="like" data-size="large" 

Open cmd or terminal to run this app

python runserver


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!