示例#1
0
文件: console.py 项目: stephentu/fbsh
def __handle__post_message(args):
    require_login()
    if len(args) == 1:
        msg = raw_input("Message: ")
    else:
        assert len(args) > 1
        msg = " ".join(args[1:])
    fbsh.post_graph_endpoint(ACCESS_TOKEN, "me/feed", {"message": msg})
    print "Successfully posted message: %s" % msg
示例#2
0
def __handle__post_message(args):
  require_login()
  if len(args) == 1:
    msg = raw_input('Message: ')
  else:
    assert len(args) > 1
    msg = ' '.join(args[1:])
  fbsh.post_graph_endpoint(ACCESS_TOKEN, 'me/feed', {'message':msg})
  print "Successfully posted message: %s" % msg
示例#3
0
文件: console.py 项目: stephentu/fbsh
def __handle__post_link(args):
    require_login()
    if len(args) == 1:
        link = raw_input("Link: ")
        msg = raw_input("Message (press enter for empty message): ")
    else:
        assert len(args) > 1
        link = args[1]
        msg = " ".join(args[2:])
    fbsh.post_graph_endpoint(ACCESS_TOKEN, "me/feed", {"link": link, "message": msg})
    print "Successfully posted link: %s" % link
示例#4
0
def __handle__post_link(args):
  require_login()
  if len(args) == 1:
    link = raw_input('Link: ')
    msg  = raw_input('Message (press enter for empty message): ')
  else:
    assert len(args) > 1
    link = args[1]
    msg  = ' '.join(args[2:])
  fbsh.post_graph_endpoint(ACCESS_TOKEN, 'me/feed', {'link':link,'message':msg})
  print "Successfully posted link: %s" % link