This has been asked several times, but after reading many different posts I still have not a basic version running for posting to a wall.
I want to post to a wall of
An access token is used to authorize your application to do stuff on the users behalf. There are several ways (also referred to as "flows") to get such a token, you can read up on it here: Facebook Developers Access Tokens. Facebook provides a tool for generating test tokens, you can find it here: Facebook Developers Access Token Tool.
Install facebook module by running the below command (if it isn't installed).
pip install facebook-sdk
Generate a token and run this code to post on your wall:
import facebook
ACCESS_TOKEN = "<your access token>"; # do not forget to add access token here
graph = facebook.GraphAPI(ACCESS_TOKEN)
graph.put_object("me", "feed", message="Hello, World!")