python - Posting to Facebook wall -


this has been asked several times, after reading many different posts still have not basic version running posting wall.

i want post wall of fb user python. php sdk (https://github.com/facebook/facebook-php-sdk) uses first example. need equivalent code in python.

require 'facebook-php-sdk/src/facebook.php';  $facebook = new facebook(array(   'appid'  => 'your_app_id',   'secret' => 'your_app_secret', ));  // user id $user = $facebook->getuser(); 

the pythonsdk (https://github.com/pythonforfacebook/facebook-sdk) says basic usage is:

graph = facebook.graphapi(oauth_access_token) 

without explaining oauth_access_token is.

according here: python - facebook api - need working example 1 has generate access token?

an access token used authorize application stuff on users behalf. there several ways (also referred "flows") such token, can read on here: facebook developers access tokens. facebook provides tool generating test tokens, can find here: facebook developers access token tool.

generate token , run code post on wall:

graph = facebook.graphapi(access_token) graph.put_object("me", "feed", message="hello, world!") 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -