def post_status(message): """Delete the old status then post a new one.""" global LAST_POST_ID global GROUP_ID # check if logged in try: fbconsole.get("/me") except: authenticate() # delete the old status if LAST_POST_ID is not None: fbconsole.delete("/"+LAST_POST_ID) #make new status post = fbconsole.post("/" + GROUP_ID + "/feed",{"message":message}) LAST_POST_ID = post['id']
def post_status(message): """Delete the old status then post a new one.""" global LAST_POST_ID global GROUP_ID # check if logged in try: fbconsole.get("/me") except: authenticate() # delete the old status if LAST_POST_ID is not None: fbconsole.delete("/" + LAST_POST_ID) #make new status post = fbconsole.post("/" + GROUP_ID + "/feed", {"message": message}) LAST_POST_ID = post['id']
#!/usr/bin/python import sys import fbconsole fbconsole.APP_ID = '177876045644347' fbconsole.AUTH_SCOPE = [ 'offline_access', 'publish_stream', 'read_stream', 'user_photos' ] fbconsole.authenticate() id = sys.argv[1] print('Deleting ID ' + id) fbconsole.delete('/' + id)
#!/usr/bin/python import sys import fbconsole fbconsole.APP_ID = '177876045644347' fbconsole.AUTH_SCOPE = ['offline_access', 'publish_stream', 'read_stream', 'user_photos'] fbconsole.authenticate() id = sys.argv[1] print('Deleting ID '+id) fbconsole.delete('/'+id)