How to use the sma.archiver.FB function in sma

To help you get started, we’ve selected a few sma examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sdockray / sma / sma / server.py View on Github external
elif action=='list':
			fb = FB(cherrypy.session['access_token'])
			fb.load_groups()
			fb.load_posts()
			content = fb.markdownify()
		elif action=='archive_group':
			fb = FB(cherrypy.session['access_token'])
			fb.archive_group(value)
			content = """
Step 2: Archiving group
-----------------------
Your group has been archived and can be seen [here](/group/%s) but now I'd like to grab images and page content from all the links.
It will take a pretty long time depending on how many links your group has shared. [Click here to start and check back later](/fb/build_group/%s)
			""" % (value,value)
		elif action=='archive_post':
			fb = FB(cherrypy.session['access_token'])
			fb.archive_post(value)
			content = """
Step 2: Archiving post
----------------------
Your post has been archived and can be seen [here](/post/%s)
			""" % value
		elif action=='build_group':
			fb = FB(cherrypy.session['access_token'])
			fb.rebuild_group(value, do_snaps=True)
			content = """
Step 3: You're done!
--------------------
You can now see the archive [here](/group/%s)
			""" % value
		return html(markdown2.markdown(content))
github sdockray / sma / sma / server.py View on Github external
content = """
Step 2: Archiving group
-----------------------
Your group has been archived and can be seen [here](/group/%s) but now I'd like to grab images and page content from all the links.
It will take a pretty long time depending on how many links your group has shared. [Click here to start and check back later](/fb/build_group/%s)
			""" % (value,value)
		elif action=='archive_post':
			fb = FB(cherrypy.session['access_token'])
			fb.archive_post(value)
			content = """
Step 2: Archiving post
----------------------
Your post has been archived and can be seen [here](/post/%s)
			""" % value
		elif action=='build_group':
			fb = FB(cherrypy.session['access_token'])
			fb.rebuild_group(value, do_snaps=True)
			content = """
Step 3: You're done!
--------------------
You can now see the archive [here](/group/%s)
			""" % value
		return html(markdown2.markdown(content))
github sdockray / sma / sma / server.py View on Github external
---------------------------
To make an archive, you need to get an "access token" from this page:
[https://developers.facebook.com/tools/explorer/](https://developers.facebook.com/tools/explorer/)

1. Click on **Get Token** and choose **Get Access Token**
2. Make sure **user_status**, **user_groups**, and **user_posts** are checked 
3. Click the **Get Access Token** button
4. Copy and paste it into the form below!
5. Hit submit and wait (a few minutes) for data to load 
<form action="/fb/access_token" method="get">
<input size="75" name="value" value="">
<input value="Submit" type="submit">
</form>
			"""
		elif action=='list':
			fb = FB(cherrypy.session['access_token'])
			fb.load_groups()
			fb.load_posts()
			content = fb.markdownify()
		elif action=='archive_group':
			fb = FB(cherrypy.session['access_token'])
			fb.archive_group(value)
			content = """
Step 2: Archiving group
-----------------------
Your group has been archived and can be seen [here](/group/%s) but now I'd like to grab images and page content from all the links.
It will take a pretty long time depending on how many links your group has shared. [Click here to start and check back later](/fb/build_group/%s)
			""" % (value,value)
		elif action=='archive_post':
			fb = FB(cherrypy.session['access_token'])
			fb.archive_post(value)
			content = """
github sdockray / sma / sma / server.py View on Github external
2. Make sure **user_status**, **user_groups**, and **user_posts** are checked 
3. Click the **Get Access Token** button
4. Copy and paste it into the form below!
5. Hit submit and wait (a few minutes) for data to load 
<form action="/fb/access_token" method="get">
<input size="75" name="value" value="">
<input value="Submit" type="submit">
</form>
			"""
		elif action=='list':
			fb = FB(cherrypy.session['access_token'])
			fb.load_groups()
			fb.load_posts()
			content = fb.markdownify()
		elif action=='archive_group':
			fb = FB(cherrypy.session['access_token'])
			fb.archive_group(value)
			content = """
Step 2: Archiving group
-----------------------
Your group has been archived and can be seen [here](/group/%s) but now I'd like to grab images and page content from all the links.
It will take a pretty long time depending on how many links your group has shared. [Click here to start and check back later](/fb/build_group/%s)
			""" % (value,value)
		elif action=='archive_post':
			fb = FB(cherrypy.session['access_token'])
			fb.archive_post(value)
			content = """
Step 2: Archiving post
----------------------
Your post has been archived and can be seen [here](/post/%s)
			""" % value
		elif action=='build_group':