Skip to content

Latest commit

 

History

History
24 lines (21 loc) · 1.07 KB

README.md

File metadata and controls

24 lines (21 loc) · 1.07 KB

Social

Note: The current library runs on Node/Express server with the possibility of porting to Django in the future. Other Social Media platforms soon to come. Contributions are always welcome.

Required

  1. NodeJS
  2. Python 3.0+

Usage

  1. In your terminal, in the "social" directory, type: $ npm install

  2. Run the node server through your terminal by using the "share.js" file.

  3. Import this library in your program by typing:
    from social.share import *
  4. Instantiate the social media class name. Eg:- twitter = Twitter()

  5. Authorize the app by accessing the "authorize()" method in social media class. Eg:-
    facebook = Facebook()
    facebook.authorize()
    
  6. Use "<social media instance>.postImage(<image path>)" to post images. Eg:- facbook.postImage("./sample_image.jpg")

  7. Use "<social media instance>.postVideo(<video path>)" to post videos. Eg:- twitter.postVideo("./sample_video.mp4")

Example file "example.py" is included with sample image to experiment.