analitics

Pages

Showing posts with label facepy. Show all posts
Showing posts with label facepy. Show all posts

Friday, March 27, 2015

Using facepy to deal with facebook .

This python module allow you to get some data from facebook using Facebook’s Graph API.
The development team tell us:
Facepy can do more than reading your latest posts and posting photographs of parrots, but you’ll have to read the documentation to find out how.
You can use pip to install this module ( pip2.7 or pip3.4):
pip install facepy
The python script is simple :

...\Python34>cd Scripts
Scripts>pip3.4.exe install facepy

Now you can test this with this simple script:
C:\Python34>python.exe
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 bit (AM
D64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import facepy
>>> from facepy import *
>>> from facepy import GraphAPI
>>> graph = GraphAPI('.....my...token.....'
)
>>> graph.get('me')
{'gender': .....................................
......................'}