Postando uma mensagem simples!


In [1]:
import facebook

O token de acesso, deve ser gerado conforme apresentado nos slides 36 até 46.

Lembre-se da validade do token de acesso!


In [2]:
access_token = 'EAACUzLmOZC7kBAODqMlhUdJXEtRJJoDWKJMCC32vC1cd9ou4FBrQNUT1pNxHJZBXZBmCl0dwSNPDl6w3YhjI6DLLwquy9AbWCZAlky2ZCiQRboCJkiuiITS8iZAZALVYZAlQP9d1W47s0j60rYeFk94ctCqrZAxST93KxGZBS5L4cRrgZDZD'

In [3]:
api = facebook.GraphAPI(access_token)

In [4]:
print(dir(api))


['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'access_token', 'debug_access_token', 'delete_object', 'delete_request', 'extend_access_token', 'fql', 'get_access_token_from_code', 'get_app_access_token', 'get_connections', 'get_object', 'get_objects', 'get_version', 'proxies', 'put_comment', 'put_like', 'put_object', 'put_photo', 'put_wall_post', 'request', 'timeout', 'version']

In [5]:
api.put_wall_post("Programação com Python + FIA")


Out[5]:
{'id': '306405989707205_308011842879953'}

In [6]:
api.put_wall_post?

In [ ]: