Giter Club home page Giter Club logo

facebook-api's Introduction

Facebook API

This is a class for Facebook API that you can use to do many things by Facebook Account

  • The class is divided into parts

Access Token

  • To do anything on Facebook, it is done through an Access Token
  • For example, you want to like on a specific post, you must put the post id and access of account
  • To get access token use access_token()
from facebook import facebook

api = facebook()
access_token = api.access_token('<Facebook Account Email>', '<Facebook Account Password>')
  • This function will set android full access token on class to use it later
  • If you already have an Access Token account set it in class via set_access_token()
api.set_access_token('<Access Token of Facebook Account>')

Graph API

  • Here you can use official Facebook Api by one function graph(method, object, object_id, params)

  • Method -> What is method you want?

    • Do you want to get data? method = get
    • Do you want to post data? method = post
    • Do you want to delete the data you sent? method = delete
  • Object -> The target object

    • There are many objects that you can choose from
    • if you want to comment on post or get list of comments, the object will be comments
    • You can learn more by official docs here Graph API Reference
  • Object ID -> This is the ID of the object you want to play with

  • Params -> For additional parameters

    • For example, if you want to write a comment in a specific post, then you want to a parameter to determine the content of the comment {'message': 'this is a comment bla bla bla'}

Examples

  • Get reactions list of post graph('get', 'reactions', object_id)
  • Delete like from post graph('delete', 'likes', object_id)

facebook-api's People

Contributors

zold1 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

sprmmo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.