Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time

Signed requests

You may parse signed requests using the SignedRequest class:

from facepy import SignedRequest

# Parse a signed request into a Python dict
signed_request_data = SignedRequest.parse(signed_request, facebook_application_secret_key)

# Get a SignedRequest object
signed_request = SignedRequest(signed_request, facebook_application_secret_key)

# Print the Facebook ID of the user that generated the signed request

# Print the OAuth access token for the user that generated the signed request
print signed_request.oauth_token.token

# Reverse-engineer the signed request
.. autoclass:: facepy.SignedRequest
    :members: parse, user, data, page, oauth_token, generate, User, Page, OAuthToken