An app to manage Linkedin posts in a Django project
Project description
django-linkedin-posts
Set up
- Get your Linkedin Access Token https://www.linkedin.com/developers/tools/oauth/token-generator
- Install from PyPI
python -m pip install django-linkedin-posts
- Add the package to your settings INSTALLED_APPS
INSTALLED_APPS = [
...
"django_linkedin_posts",
...
]
- Add the following setting variables
## thid-party apps
# django-linkedin-posts (our app)
import os
from dotenv import load_dotenv # python-dotenv
load_dotenv()
LINKEDIN_AUTHOR_TPYE="organization" # "organization" or "person"
LINKEDIN_AUTHOR_ID=os.environ.get("LINKEDIN_AUTHOR_ID")
LINKEDIN_ACCESS_TOKEN=os.environ.get("LINKEDIN_ACCESS_TOKEN")
## Not needed at the moment
# LINKEDIN_CLIENT_ID=os.environ.get("LINKEDIN_CLIENT_ID")
# LINKEDIN_CLIENT_SECRET=os.environ.get("LINKEDIN_CLIENT_SECRET")
# LINKEDIN_REFRESH_TOKEN=os.environ.get("LINKEDIN_REFRESH_TOKEN")
Usage
- Create a simple Post
from django_linkedin_posts.models import Post
# create a post instance in the db
post = Post.objects.create(
comment="Hi, this is me publishing a post using django-linkedin-posts"
)
# share it in Linkedin
post.share()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-linkedin-posts-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f418279b5f8e6265d9064108d11becfbde494a51e9870d75c305875e0778df05 |
|
MD5 | 5c989d000ac385511b041a16e4524d46 |
|
BLAKE2b-256 | 275ed90f5c07431532defb894b5cd9d60123199f2adde3ad1ef6ac1b1cd2ba8a |
Close
Hashes for django_linkedin_posts-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ff8b812d659b7517115576bcf514a51c489b3dcf7379a4c2859dbefb31654d5 |
|
MD5 | 77e5d033b1073dc5d0ea2c535f91877e |
|
BLAKE2b-256 | f16f8dca5c70d1fcb8851ec081e11b451368fcf72cc6355ef59b54e289f46480 |