Skip to content

Instantly share code, notes, and snippets.

@j2labs
Created November 25, 2009 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j2labs/242480 to your computer and use it in GitHub Desktop.
Save j2labs/242480 to your computer and use it in GitHub Desktop.
def addLike(self, uid=None, post_id=None):
"""
Facebook API call. See http://developers.facebook.com/documentation.php?v=1.0&method=stream.addLike
"""
args = {}
if uid is not None: args['uid'] = uid
if post_id is not None: args['post_id'] = post_id
return self('addLike', args)
def removeLike(self, uid=None, post_id=None):
"""
Facebook API call. See http://developers.facebook.com/documentation.php?v=1.0&method=stream.removeLike
"""
args = {}
if uid is not None: args['uid'] = uid
if post_id is not None: args['post_id'] = post_id
return self('removeLike', args)
def remove(self, post_id, uid=None):
"""
Facebook API call. See http://developers.facebook.com/documentation.php?v=1.0&method=stream.remove
"""
args = {}
args['post_id'] = post_id
if uid is not None: args['uid'] = uid
return self('remove', args)
def addComment(self, post_id, comment, uid=None):
"""
Facebook API call. See http://developers.facebook.com/documentation.php?v=1.0&method=stream.addComment
"""
args = {}
args['post_id'] = post_id
args['comment'] = comment
if uid is not None: args['uid'] = uid
return self('addComment', args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment