justinlittman / fbarc Goto Github PK
View Code? Open in Web Editor NEWA commandline tool and Python library for archiving data from Facebook using the Graph API.
License: Creative Commons Zero v1.0 Universal
A commandline tool and Python library for archiving data from Facebook using the Graph API.
License: Creative Commons Zero v1.0 Universal
python3 fbarc.py graph page MarkRWarner | python fbarc_viewer.py
Warning: Using an app token. You may encounter authorization problems.
Getting graph for node MarkRWarner
Traceback (most recent call last):
File "fbarc.py", line 875, in _perform_http_post
raise_for_fb_exception(response, data=data)
File "fbarc.py", line 432, in raise_for_fb_exception
raise FbException(error_response)
main.FbException: Unsupported get request. Object with ID 'MarkRWarner' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "fbarc.py", line 875, in _perform_http_post
raise_for_fb_exception(response, data=data)
File "fbarc.py", line 432, in raise_for_fb_exception
raise FbException(error_response)
main.FbException: Unsupported get request. Object with ID 'MarkRWarner' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "fbarc.py", line 875, in _perform_http_post
raise_for_fb_exception(response, data=data)
File "fbarc.py", line 432, in raise_for_fb_exception
raise FbException(error_response)
main.FbException: Unsupported get request. Object with ID 'MarkRWarner' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "fbarc.py", line 875, in _perform_http_post
raise_for_fb_exception(response, data=data)
File "fbarc.py", line 432, in raise_for_fb_exception
raise FbException(error_response)
main.FbException: Unsupported get request. Object with ID 'MarkRWarner' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "fbarc.py", line 875, in _perform_http_post
raise_for_fb_exception(response, data=data)
File "fbarc.py", line 432, in raise_for_fb_exception
raise FbException(error_response)
main.FbException: Unsupported get request. Object with ID 'MarkRWarner' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "fbarc.py", line 875, in _perform_http_post
raise_for_fb_exception(response, data=data)
File "fbarc.py", line 432, in raise_for_fb_exception
raise FbException(error_response)
main.FbException: Unsupported get request. Object with ID 'MarkRWarner' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "fbarc.py", line 875, in _perform_http_post
raise_for_fb_exception(response, data=data)
File "fbarc.py", line 432, in raise_for_fb_exception
raise FbException(error_response)
main.FbException: Unsupported get request. Object with ID 'MarkRWarner' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "fbarc.py", line 875, in _perform_http_post
raise_for_fb_exception(response, data=data)
File "fbarc.py", line 432, in raise_for_fb_exception
raise FbException(error_response)
main.FbException: Unsupported get request. Object with ID 'MarkRWarner' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "fbarc.py", line 875, in _perform_http_post
raise_for_fb_exception(response, data=data)
File "fbarc.py", line 432, in raise_for_fb_exception
raise FbException(error_response)
main.FbException: Unsupported get request. Object with ID 'MarkRWarner' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "fbarc.py", line 488, in _get_nodes
node_graph_dict[node_ids[0]] = self.get_node(node_ids[0], definition_name)
File "fbarc.py", line 567, in get_node
raise e
File "fbarc.py", line 546, in get_node
node_graph = self._perform_http_post(url, data=params)
File "fbarc.py", line 914, in _perform_http_post
**kwargs)
File "fbarc.py", line 914, in _perform_http_post
**kwargs)
File "fbarc.py", line 914, in _perform_http_post
**kwargs)
[Previous line repeated 5 more times]
File "fbarc.py", line 910, in _perform_http_post
raise e
File "fbarc.py", line 875, in _perform_http_post
raise_for_fb_exception(response, data=data)
File "fbarc.py", line 432, in raise_for_fb_exception
raise FbException(error_response)
main.FbException: Unsupported get request. Object with ID 'MarkRWarner' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "fbarc.py", line 1132, in
main()
File "fbarc.py", line 213, in main
args.csv_output_dir, fb)
File "fbarc.py", line 255, in graph_command
exclude_definition_names=exclude_definition_name), graph_outputs)
File "fbarc.py", line 260, in print_graphs
for graph in graph_iter:
File "fbarc.py", line 476, in get_nodes
for node_graph in self._get_nodes(node_counter, node_queue, queued_nodes, levels, exclude_definition_names):
File "fbarc.py", line 512, in _get_nodes
log.warning('Skipping %s due to unexpected GraphMethodException: %s', node_id, e)
UnboundLocalError: local variable 'node_id' referenced before assignment
Here is an idea that you could use for your search function. It returns as a dict though which makes parsing a pain.
users = graph.request('/search?q='+q+'&type=user')
This can be expanded as needed, but it works for users.
How can I find out why there was a problem with the JSON?
Full error message:
python fbarc.py --debug graph page altenbeken.info --levels 2 > altenbeken.jsonl
Access token expires on 2018-03-04 10:21:56+00:00
Getting graph for node altenbeken.info
Traceback (most recent call last):
File "fbarc.py", line 476, in raise_for_fb_exception
raise FbException(error_response)
__main__.FbException: An unknown error has occurred.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "fbarc.py", line 1156, in <module>
main()
File "fbarc.py", line 214, in main
args.csv_output_dir, fb)
File "fbarc.py", line 273, in graph_command
exclude_definition_names=exclude_definition_name), graph_outputs)
File "fbarc.py", line 298, in print_graphs
for graph in graph_iter:
File "fbarc.py", line 522, in get_nodes
for node_graph in self._get_nodes(node_counter, node_queue, queued_nodes, le
vels, exclude_definition_names):
File "fbarc.py", line 536, in _get_nodes
node_graph_dict = self.get_node_batch(node_ids, definition_name)
File "fbarc.py", line 617, in get_node_batch
nodes_graph_dict = self._perform_http_post(url, data=params)
File "fbarc.py", line 908, in _perform_http_post
raise_for_fb_exception(response, data=data)
File "fbarc.py", line 477, in raise_for_fb_exception
except json.decoder.JSONDecodeError:
AttributeError: 'module' object has no attribute 'JSONDecodeError'
debug.log
2018-01-05 12:05:15,428 ERROR Error for https://graph.facebook.com/v2.11 ({'fields': 'id,metadata{type},description,end_time,event_times,name,start_time,attending_count,category,cover,declined_count,interested_count,is_canceled,maybe_count,noreply_count,owner,picture,place,timezone,type,updated_time,comments.limit(2000){id,created_time,from,message,permalink_url},feed.limit(25){id,created_time,from,message,permalink_url,status_type,to,updated_time},live_videos.limit(100){id,creation_time,description,permalink_url,title},photos.limit(100){id,created_time,link,name,updated_time}', 'access_token': 'XXXXXX', 'ids': '330364757445239,1785087901790238,1778205972478904,1348214928621073,215387655660218,268732113631738,396768557350139,1633347510043387,1027045984065537,139391659967274,1523274661042677,1832586256990227,985206564948474,300970570319747,193476294470573,238752436577395,1178518992264453,580038218861570,180063365812330,237478843337911', 'method': 'GET', 'metadata': 1}): {
"error": {
"message": "An unknown error has occurred.",
"code": 1,
"fbtrace_id": "A98KjDQxfoZ",
"type": "OAuthException"
}
}
it only dumps json to terminal, so there is not json file to pass to the graphing
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.