{"action":"created","issue":{"url":"https://api.github.com/repos/dfreelon/fb_scrape_public/issues/4","repository_url":"https://api.github.com/repos/dfreelon/fb_scrape_public","labels_url":"https://api.github.com/repos/dfreelon/fb_scrape_public/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/dfreelon/fb_scrape_public/issues/4/comments","events_url":"https://api.github.com/repos/dfreelon/fb_scrape_public/issues/4/events","html_url":"https://github.com/dfreelon/fb_scrape_public/issues/4","id":275784371,"number":4,"title":"fails to collect authors from comments","user":{"login":"arianpasquali","id":200721,"avatar_url":"https://avatars3.githubusercontent.com/u/200721?v=4","gravatar_id":"","url":"https://api.github.com/users/arianpasquali","html_url":"https://github.com/arianpasquali","followers_url":"https://api.github.com/users/arianpasquali/followers","following_url":"https://api.github.com/users/arianpasquali/following{/other_user}","gists_url":"https://api.github.com/users/arianpasquali/gists{/gist_id}","starred_url":"https://api.github.com/users/arianpasquali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arianpasquali/subscriptions","organizations_url":"https://api.github.com/users/arianpasquali/orgs","repos_url":"https://api.github.com/users/arianpasquali/repos","events_url":"https://api.github.com/users/arianpasquali/events{/privacy}","received_events_url":"https://api.github.com/users/arianpasquali/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2017-11-21T16:49:11Z","updated_at":"2017-11-21T21:04:50Z","closed_at":"2017-11-21T20:07:57Z","author_association":"NONE","body":"hey. nice piece of script. facebook data collection is a hassle and api keeps changing all the time.\r\n\r\nUnfortunately it fails now to collect authors from comments. I imagine it was working before. \r\nIt works fine for posts.\r\n\r\nIf you try making the same request using Facebook Graph Explorer it works perfectly (using versions <= 2.10).\r\nIt seems to be related with access token permission, but I couldn't find a way fix it properly yet.\r\n\r\nEven if you inform the fields you want Facebook doesn't send you the \"from\" field wich carries authors info and the script breaks.\r\n\r\nTo make it work you have to ignore authors info deleting lines 94 and 95.\r\n\r\n```Traceback (most recent call last):\r\n  File \"fb_scrapper.py\", line 15, in <module>\r\n    comments = fsp.scrape_fb(app_id,access_token,\"6815841748_10155401589581749\",scrape_mode=\"comments\")\r\n  File \"./fb_scrape_public/fb_scrape_public.py\", line 202, in scrape_fb\r\n    csv_data = make_csv_chunk(next_item,scrape_mode,msg_user,msg_content)\r\n  File \"./fb_scrape_public/fb_scrape_public.py\", line 107, in make_csv_chunk\r\n    csv_line = [line['from']['name'], '_' + \\\r\nKeyError: 'from'\r\n```\r\n\r\n\r\nI managed to make it respond correctly by using the access token generated by Graph Explorer, but it is not the best solution in this case.\r\n\r\nI wonder if you have faced this problem already."},"comment":{"url":"https://api.github.com/repos/dfreelon/fb_scrape_public/issues/comments/346160498","html_url":"https://github.com/dfreelon/fb_scrape_public/issues/4#issuecomment-346160498","issue_url":"https://api.github.com/repos/dfreelon/fb_scrape_public/issues/4","id":346160498,"user":{"login":"dfreelon","id":6620439,"avatar_url":"https://avatars1.githubusercontent.com/u/6620439?v=4","gravatar_id":"","url":"https://api.github.com/users/dfreelon","html_url":"https://github.com/dfreelon","followers_url":"https://api.github.com/users/dfreelon/followers","following_url":"https://api.github.com/users/dfreelon/following{/other_user}","gists_url":"https://api.github.com/users/dfreelon/gists{/gist_id}","starred_url":"https://api.github.com/users/dfreelon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfreelon/subscriptions","organizations_url":"https://api.github.com/users/dfreelon/orgs","repos_url":"https://api.github.com/users/dfreelon/repos","events_url":"https://api.github.com/users/dfreelon/events{/privacy}","received_events_url":"https://api.github.com/users/dfreelon/received_events","type":"User","site_admin":false},"created_at":"2017-11-21T21:04:50Z","updated_at":"2017-11-21T21:04:50Z","author_association":"OWNER","body":"Here's what I get from that post ID with my app ID + secret, FWIW...\r\n{\r\n   \"data\": [\r\n      {\r\n         \"from\": {\r\n            \"name\": \"Michelle Timothy\",\r\n            \"id\": \"10214975805897116\"\r\n         },\r\n         \"message\": \"I get insurance through my employer but, I had to listen anyway because I so miss a coherent complete sentence speaking president that doesn\\u2019t sound like a tired, cranky toddler.\",\r\n         \"id\": \"10155375836346749_10155375912656749\"\r\n      },\r\n      {\r\n         \"from\": {\r\n            \"name\": \"Barbara Ocon Hulsizer\",\r\n            \"id\": \"10214511581293991\"\r\n         },\r\n         \"message\": \"I love this. The current administration cut the advertising budget by 90\\u0025. So the guy with 55,000,000 followers puts this on his Facebook page!!\",\r\n         \"id\": \"10155375836346749_10155375844451749\"\r\n      },\r\n      {\r\n         \"from\": {\r\n            \"name\": \"David Bourton\",\r\n            \"id\": \"892133337628195\"\r\n         },\r\n         \"message\": \"A President able to speak above the level of a toddler. Doesn't seem like much to ask for but you don't realise how valuable it is until it's replaced by an infant orange.\",\r\n         \"id\": \"10155375836346749_10155375847121749\"\r\n      },\r\n      [etc]"}}
{"actor":{"display_login":"dfreelon"}}