Python Facebook data feed scrapping - get the name of the poster on page -


When using the facebook graph api to scrape data from a public page (/feed) via python, is it possible to query the name of the user who posted content to the page? When I query for the fields name or id in the url, the code returns the name of a link included in a post or the id of the actual post content and not the user who posted. I am trying to get the user names so that I can effectively isolate and filter the user who owns the public page. When trying to quantify the sentiment of users who are posting on the page, I need to be able to hide all posts that were made by the page owner.

# create url
base = ""
node = "/%s/feed" % page_id 
fields = "/?fields=message,link,created_time,type,name,id"
parameters = "&limit=%s&access_token=%s" % (1, access_token)
url = base + node + fields + parameters

# retrieve data via json
data = json.loads(url)

Show source
| facebook   | python   | graph   2016-12-29 23:12 0 Answers

Answers ( 0 )

◀ Go back