I've build an Admin panel to post contents on front-end such as Articles.
This admin is created using Django Admin.
How can I share newly posted article on Facebook and Twitter?
You can use post_save signal which allows you to hook on a new object creation, for example:
from django.db import models from django.dispatch import receiver class Article(models.Model): name = models.CharField(max_length = 255) @receiver(post_save, sender = Article) def new_article_event(sender, instance, created, **kwargs): if created: # Put facebook/twitter post code here
It's important that you'll check if created is True, to make sure you perform posting only on new articles.
You can use the following projects to post on Facebook/Twitter: