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.Start by getting your secret API Key in Ayrshare Dashboard.Next, install the Python package:
Examples of Post, History, and Delete. Please see the PyPI Package for more information.
Copy
Ask AI
from ayrshare import SocialPostsocial = SocialPost('8jKj782Aw8910dCN') # get an API Key at ayrshare.com# Post to Platforms Twitter, Facebook, and LinkedInpostResult = social.post({'post': 'Nice Posting 2', 'platforms': ['twitter', 'facebook', 'linkedin'], 'profileKey': 'JKSDJI-JKKJKKJ'})print(postResult)# DeletedeleteResult = social.delete({'id': postResult['id']})print(deleteResult)# Historyprint(social.history())