All notable changes to this project will be documented in this file.
- Mitigated a Facebook bug that causes
get_extended_access_tokento sometimes fail because it does not includeexpires_in. This now defaults to 1 hour.
- Fixed a bug that caused
get_extended_access_tokento fail on newer Graph API versions.
- Support for Python 3.7 (to be fair, it already worked, just tests were failing).
- The logger is now named so you can silence retries.
- You may now send additional data with DELETE requests.
- You may no longer search for posts, users, events, groups or checkins, as Facebook no longer allows it.
- The HTTP headers of the response are now available in
response['headers']. FacebookErrornow hasfbtrace_idto aid in debugging.
- Python 3 compatibility.
- Paginated requests now retry same as the first.
- Fixed a bug where image files would throw a UnicodeDecodeError.
- FQL (which is not available since Graph API version 2.1)
- Fixed an issue where
get_application_access_tokenusing Graph API versions 2.3+ would return JSON instead of a query string, resulting in anAttributeErrorto be thrown.
- Fixed an issue where
get_extended_access_tokenusing Graph API versions 2.3+ would return JSON instead of a query string, resulting in anAttributeErrorto be thrown. FacebookErrorinstances now contain additional data about the error.
- Fixed an issue where pagination of nested resources would break.
- You may now specify the API version to use with
GraphAPI.
- Facepy now proxies the error message from Facebook for 5XX responses.
- Facepy now raises
FacebookErroron any response in the 5XX range.
FacebookError,HTTPError,OAuthErrorandSignedRequestErrorare now available from thefacepymodule for convenience.GraphAPInow raisesFacebookErrorupon receiving HTTP 500 from Facebook.
GraphAPInow accepts an argumenttimeout, which can be eitherNoneor an integer describing how many seconds to wait for a response.
- Fixed an issue where six would cause an
ImportErrorunless already installed. It is now a direct dependency.
GraphAPInow supports securing Graph API requests with application secret proofs.GraphAPI#postnow supports user-generated images.
- The last bit of the tuple returned from
get_extended_access_tokenis nowNoneif the access token won't expire. GraphAPI#batchcan now handle more than 50 requests at a time.- Fixed a bug that caused unicode URLs to fail.
- Changed
GraphAPImethods to returndecimal.Decimalinstances for floating-point numbers instead offloat, which can cause precision losses not acceptable for financial operations. - Nested dictionaries, lists and sets are now automatically encoded as JSON.
- You may now elect to not verify Facebook's SSL certificate.
- You may now substitute colons with underscores in keys such as
fb:explicitly_shared. - Facepy is now compatible with Python 3.
- Fixed a bug that caused parsing signed requests to fail when the
userkey is not present.
- Fixed a bug that caused a KeyError for signed requests that were missing some keys for its "page" attribute.
- You may now extend access tokens with
get_extended_access_token.
- Fixed a bug that caused batch requests with a body to fail.
- Fixed a bug that caused paths that started with a slash to fail.
- Fixed a bug that caused exception messages to be omitted.
- Facepy exceptions may now be pickled.
- Fixed a bug that caused pagination to stop prematurely.
- You may now query application access tokens with
get_application_access_token. SignedRequest.parsenow returns a dictionary describing the payload of the signed request instead of aSignedRequestinstance.SignedRequest.__init__now accepts argumentssigned_requestandapplication_secret_keyand no longer facilitates for constructing arbitrary signed requests.SignedRequest#generateno longer requires the provision ofapplication_secret_key.GraphAPInow supports retries forget,post,delete,searchandfql.GraphAPI#getis now more intelligent about pagination and should no longer query Facebook for another page of results if the current page has less elements thanlimit.
SignedRequest#oauth_tokenandSignedRequest.OAuthTokenhave been removed (deprecated since v0.6).
- Fixed a bug that caused some exceptions to be returned rather than raised.
- You may now access the original data of the signed request from
SignedRequest#raw. - You may now issue FQL queries with
GraphAPI#fql. FacebookErrorexceptions yielded fromGraphAPI#batchnow include the request that produced the error.
- Fixed a bug that caused
GraphAPI#batchto crash upon receiving legacy errors from Facebook.
- Facepy will now raise
OAuthErrorfor authorization-related errors. - Facepy will now reuse the connection to Facebook.
- Fixed a bug that caused a KeyError upon parsing errors without an error code.
- Facepy now raises
GraphAPI.HTTPErrorfor requests whose transport failed, andGraphAPI.FacebookErrorfor requests that produced an error in Facebook's API.
- Fixed a bug that caused some errors to be ignored.
- Fixed a bug that caused an error for empty batch responses.
- Facepy now supports batch requests.
- Updated requests.
- Fixed a bug that caused
SignedRequest.User#has_authorized_applicationto be incorrect for signed requests with an user id, but no OAuth Token. - Fixed a bug that caused queries that returned 3xx status codes to yield a blank string
- Fixed a bug that caused installation to fail in some circumstances.
- Fixed a bug that caused a KeyError upon parsing a signed request that didn't include the user's age.
- Fixed a bug that caused a NameError upon providing a list of strings as a Graph API parameter.
- Search results may now be paged.
facepy.VERSIONis nowfacepy.__version__
- It is now considerably easier to create signed requests programmatically.
- Facepy now returns the complete API response instead of just its "data" attribute.
- Facepy is now compatible with Python 2.4.
- Fixed a bug that caused a KeyError if the user's locale or country is missing from the signed request.
- Fixed a bug that caused a TypeError upon parsing signed requests in unicode.
- Added support for parsing and reverse-engineering signed requests.
- Added support for file-like objects in POST and PUT.
- Fixed a bug that prevented the 'page' argument to GraphAPI#get from working correctly.
- GraphAPI#get now has a new argument 'page', which returns a generator that iterates over each page of results.
- The GraphAPI class may now be initialized by signed request.
- Fix a bug that caused non-JSON data (e.g. pictures) to raise a ValueError.
- Fix a bug that caused a TypeError if the 'path' argument is an integer.
- Exceptions have been moved.