I get this error AttributeError: module 'facebook' has no attribute 'GraphAPI'

34 views
Skip to first unread message

Ilayaraja Sivaprakasam

unread,
Apr 14, 2020, 8:21:15 PM4/14/20
to PythonForFacebook
Hi Friends,


I tried creating a simple request as given below.


import json
import facebook

token="XXX"
graph = facebook.GraphAPI(toekn)
profile = graph.get_object('me',fields ="first_name,email")

while running this , I get this error.


AttributeError: module 'facebook' has no attribute 'GraphAPI'



Not sure If I am missing something.

Thanks,
Ilay

Ilayaraja Sivaprakasam

unread,
Apr 14, 2020, 11:27:27 PM4/14/20
to PythonForFacebook
Please Ignore. I believe I was using the file named facebook.py. so when I imported it , it was failing.
Reply all
Reply to author
Forward
0 new messages