Skip to content

Commit

Permalink
Remove FQL support.
Browse files Browse the repository at this point in the history
No active versions of the Graph API have support for FQL.
  • Loading branch information
martey committed Aug 8, 2016
1 parent 18f61c0 commit 7f32291
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 27 deletions.
4 changes: 2 additions & 2 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Changelog
Version 2.0.0 (Future Release)
==============================
- Add support for Graph API versions 2.6 and 2.7.
- Remove support for Graph API version 2.0 and change default Graph API
version to 2.1.
- Remove support for Graph API version 2.0 and FQL.
- Change default Graph API version to 2.1.
- Allow offline generation of application access tokens.

Version 1.0.0 (2016-04-01)
Expand Down
8 changes: 0 additions & 8 deletions facebook/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,14 +272,6 @@ def request(
raise GraphAPIError(result)
return result

def fql(self, query):
"""FQL query.
Example query: "SELECT affiliations FROM user WHERE uid = me()"
"""
return self.request(self.version + "/" + "fql", {"q": query})

def get_app_access_token(self, app_id, app_secret, offline=False):
"""
Get the application's access token as a string.
Expand Down
17 changes: 0 additions & 17 deletions test/test_facebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,23 +112,6 @@ def test_invalid_format(self):
facebook.GraphAPI, version="2.23")


class TestFQL(FacebookTestCase):
def test_fql(self):
graph = facebook.GraphAPI(version=2.0)
graph.access_token = graph.get_app_access_token(
self.app_id, self.secret)

# Ensure that version is below 2.1. Facebook has stated that FQL is
# not present in this or future versions of the Graph API.
if graph.get_version() < 2.1:
# This is a tautology, but we are limited in what information
# we can retrieve with a proper OAuth access token.
fql_result = graph.fql(
"SELECT app_id from application where app_id = %s" %
self.app_id)
self.assertEqual(fql_result["data"][0]["app_id"], str(self.app_id))


class TestAuthURL(FacebookTestCase):
def test_auth_url(self):
perms = ['email', 'birthday']
Expand Down

0 comments on commit 7f32291

Please sign in to comment.