Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

Lightweight library for refreshing your facebook access token.

Project Description
===================
Facebook Token
===================

# Install
pip install facebooktoken

# Prepare your necessary varibles
1. Visit https://developers.facebook.com/tools/explorer/ and retrieve your short lived access token
2. Visit https://developers.facebook.com/apps/ and retreive your **APP ID** and **APP SECRET**

# Use your retrieved variables
```python
from facebooktoken import FacebookTokenRefresher

ftr = FacebookTokenRefresher(
app_id=700797440051611,
app_secret="485c92c8220b87badbe8f6bb5cd02be7",
short_access_token="EAAJ9Xx55SZA0BAHmtrLHE3mvthKHW5mbBDXpkW6haI62UBevj8bZB1DWdoGKKtYhevbZBvtyOBHVdC7i3cFmxbO7PaUpjS2yovRO4BWPsNcmRqLzUCcAcU70dkl3WrdrqZAvG1jPWrdcnVJZANKiZCJmqf44vXfNU9kAzA9uqRM0FTzYZBk6P6QYlpQJ2LJiNQZD"
)

results = ftr.refresh()
```

### Results with status code 200
```json
{
'access_token': 'EAAJ9Xx55SZA0BAKt4QswTRq7CFx0V4a9Ria1DrOlP36rtyJDUZAOmIdMaO7LZBTInDUaN7jnIgckxwy5FYApzqrpYYhbM5rsBSzx9TLZAdKrFk9BRDCw6foj07dEYkQhbPq8TYYeRYqDeLutgwB4hbVyYSes43AZD',
'expires': u'5179894'
}
```

## On failure
By default on failure FacebookTokenRefresherException will get raised with the response data. You could if needed pass raise_exception=False when using the *refresh()* method.

### Results on failure with execption raised (Exception)
```python
facebooktoken.base.FacebookTokenRefresherException: {
"error": {
"message": "Invalid Client ID",
"code": 101,
"type": "OAuthException",
"fbtrace_id": "EYsYDFbxVAm"
}
}
```

### Results on failure without execption raised (Dictionary)
```json
{
"error": {
"message": "Invalid Client ID",
"code": 101,
"type": "OAuthException",
"fbtrace_id": "DFbQ8aA94t5"
}
}
```
Release History

Release History

This version
History Node

0.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
facebooktoken-0.0.1.tar.gz (3.2 kB) Copy SHA256 Checksum SHA256 Source Jan 27, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting