Facebook has Python support?

The Python SDK seems to be removed from Github. https://github.com/facebook/python-sdk returns 404.

Have they moved development to another place, refused support or is it just a mistake? The developer's site still links to Github (see https://developers.facebook.com/opensource/ ), but that really means little.

Does anyone have a clone?

Edit

I understand that the API is still available, but this is not entirely true. Many third-party packages rely on the SDK (e.g. django-socialregistration). Removing the repository broke all of them (as this often requires a package), which in turn disrupts site deployment.

+7
source share
3 answers

Reply from Facebook

Official answer from Facebook

We support or provide the official Python Facebook SDK for longer. You can find some informal SDKs for Python, or you can use simple urllib.urlopen calls directly to the Graph API.

Source: https://developers.facebook.com/bugs/200182333402545

+1
source

To answer the question about the clone, yes:

https://github.com/flashingpumpkin/facebook-sdk-fork

This is the last thing that happened yesterday.

+2
source

No, you can use the api chart for Facebook using urlread functions. All you have to do is get the access token from the user using Javascript, for this there is documentation on the FB developer site. Here is an example using lib functions

class Facebook(object): def __init__(self, auth_token): self.auth_token = auth_token def load(self, method, user_id = 'me'): raw = urlopen("https://graph.facebook.com/%s/%s/?access_token=%s" % (user_id, method, self.auth_token)).read() data = loads(raw) return data['data'] or [] def with_fields(self, method, user_id = 'me', fields = 'name,likes'): raw = urlopen("https://graph.facebook.com/%s/%s/?fields=%s&access_token=%s" % (user_id, method, fields, self.auth_token)).read() data = loads(raw) return data['data'] or [] def likes(self, user_id = 'me'): return self.with_fields('likes', user_id, 'name,category') def me(self): data = loads (urlopen("https://graph.facebook.com/me?fields=name&access_token=%s" % self.auth_token).read()) return data or {} def expand(self, like): data = loads (urlopen("https://graph.facebook.com/%s?access_token=%s" % (like['id'], self.auth_token)).read()) return data or {} def friends(self, user_id = 'me'): return self.load('friends', user_id) def movies(self, user_id = 'me'): return self.with_fields('movies', user_id) def music(self, user_id = 'me'): return self.with_fields('music', user_id) def picture(self, user_id='me', size=None): if size: return "https://graph.facebook.com/%s/picture?access_token=%s&type=%s" % (user_id, self.auth_token, size) return "https://graph.facebook.com/%s/picture?access_token=%s" % (user_id, self.auth_token) 
0
source

All Articles