Python PyPI
Python PyPI client package for Ayrshare

Overview of Python Client Package

Install the Social-Post-API PyPI Package if you use Python on the server-side. The package simplifies the calls by wrapping the RESTful calls.
Obtain your secret API Key at www.ayrshare.com

Installation

1
pip install social-post-api
Copied!

General Usage

Examples of Post, History, and Delete:
1
from ayrshare import SocialPost
2
social = SocialPost('8jKj782Aw8910dCN') # get an API Key at ayrshare.com
3
​
4
# Post to Platforms Twitter, Facebook, and LinkedIn
5
postResult = social.post({'post': 'Nice Posting 2', 'platforms': ['twitter', 'facebook', 'linkedin']})
6
print(postResult)
7
​
8
# Delete
9
deleteResult = social.delete({'id': postResult['id']})
10
print(deleteResult)
11
​
12
# History
13
print(social.history())
Copied!

More Information and Documentation

Last modified 1mo ago