Giter Site home page Giter Site logo

abdieffendi / facebook_client_terminal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kissrobber/facebook_client_terminal

0.0 1.0 0.0 131 KB

A command line interface (CLI) for facebook written in javascript(node.js). You can facebook on your terminal.

Home Page: http://kissrobber.github.io/facebook_client_terminal/

License: Other

facebook_client_terminal's Introduction

Facebook Client Terminal.

A command line interface (CLI) for facebook.

Demo

Go to the emulator running in web browser.
Note: running in REPL mode

Practical command example

Do you want to have a successful career?
Add this command to Cron. (automatically like all your boss's status :P)

node js/cmd.js fql "SELECT status_id FROM status WHERE uid = '#{facebook userid of your boss}' AND NOT(status_id IN (SELECT object_id FROM like WHERE user_id = me() AND object_type = 'status'))" | grep status_id: | awk '{ print $5}' | xargs -I 'status' node js/cmd.js like 'status'

Note: this command doesn't work in the above Demo.

Usage

Setup

Copy js/config.json.example to js/config.json and edit this file.

npm update

Run

A Read-Eval-Print-Loop (REPL) mode: node js/run.js

Just execute a command: node js/cmd.js #{a command you like}
For example, to get your name node js/cmd.js api me fields=name | awk '/- name:/{ { for(i=3;i<NF;i++) printf("%s ",$i) } print($NF) }'

Essential commands

home: get your feed. (synonym for api me/home)

#{object_id}: get the object.

post #{your message}: post your message. (synonym for api me/feed post #{your message})

like #{object_id}: like the object. (synonym for api #{object_id}/likes post)

unlike #{object_id}: unlike the object. (synonym for api #{object_id}/likes delete)

comments #{object_id}: get the comments of the object to the object. (synonym for api #{object_id}/comments)

comment #{object_id} #{your comment}: post the comment. (synonym for api #{object_id}/comments post message=#{your comment})

Low order commands

api #{object} [method] [params]: execute the facebook api.

fql #{fql}: execute the FQL.

Misc

you can use the index in the result list of the previous command instead of the object_id.
for example: like #1 instead of like 123456789

Command examples

get the facebook groups you are in: api me/groups

get the feed of the group: api #{object_id}/feed

get the messages from your inbox: api me/inbox

make an event: api events post name=#{name of the event}&start_time=#{start time}

invite your friends to the event: api #{event_id}/invited/#{user_id} post

get the event detail: api #{event_id}

get the events your are invited to: api me/events/not_replied

attend the event: api #{event_id}/attending post

get the notifications: api me/notifications

search friends by name:

fql select uid, name from user where uid in (select uid2 from friend where uid1 = me()) and strpos(lower(name), lower('#{a part of name}')) >= 0

get the comments of the object in reverse chronological order: fql select fromid, username, text from comment where post_id = '#{object_id}' order by time desc

facebook_client_terminal's People

Contributors

kissrobber avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.