[CBLX] FBCMD: Command Line for Facebook | (Linux Magazine) |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/carrefourblinux Archives
]
Hello le forum,
de plus en plus d'amis et amies valides m'invitent, ou me demandent pourquoi
je ne fais (toujours) pas partie de la GRANDE communauté "fessebouc" :
- à la fois ça m'embête vu que je suis qq'un de très social,
- en même temps j'ai pas envie *ni* de devoir trop donner d'infos perso à
cette société désormais quotée en Bourse, *ni* à accéder à mon compte
FB par outil graphique.
Mais apparement (et vous me direz si vous en avez déjà rencontrés d'autres)
il existe bel et bien un tool, appelé FBCMD, comme dans
"FaceBook CoMmanDline tool", en ligne de commande donc!
cf. URL: http://www.linux-mag.com/id/8705/
(voir les [ ] refs tout en bas)
<snip>
FBCMD: Command Line for Facebook
What's better than the command line and Facebook? How about combining
the two?
By Ken Hess
Monday, May 16th, 2011
Just because you’re stuck at the command line all day long doesn’t mean
that you can’t participate in the awesomeness of social networking. You
can enjoy both with [40]FBCMD, the command line Facebook applications.
Back in February, I wrote [41]Tweeting from the Command Line with Twyt,
which, as you remember, was an article covering the command line
Twitter client, Tywt. Now, you can have your Facebook and the
convenience of the command line to satisfy your social networking
addiction. And, better still is that at the command line, no one will
ever suspect that you’re Facebooking. Power to the people! The command
line-using people, that is.
The Basics
There are a few prerequisites for installing the command line Facebook
application, FBCMD. PHP 5.x is a requirement, since the application is
a single PHP file. You can install php5 via any method you wish but, in
my experience, I had to install php5-cli, php5-gd, and php5-mysql to
use this application. Your experience and mileage may vary.
Connect to the FBCMD and download the PHP file or grab it easily via
curl.
$ curl -O https://github.com/dtompkins/fbcmd/raw/master/fbcmd_update.php
And, run the following two commands to complete this very simple
installation.
$ sudo php fbcmd_update.php sudo
fbcmd update utility [version 2.91]
http://fbcmd.dtompkins.com/update
php fbcmd_update.php install
fbcmd update utility [version 2.91]
http://fbcmd.dtompkins.com/update
.....................
Update: COMPLETE!
fbcmd version: [none] --> [1.0-beta5-dev1]
Note: fbcmd_update.php is now at [/usr/local/lib/fbcmd/fbcmd_update.php]
so you can remove the old one at [/home/khess/fbcmd_update.php]
type fbcmd to begin
As the prompt suggests, type fbcmd and see what happens.
$ fbcmd
Welcome to fbcmd! [version 1.0-beta5-dev1]
This application needs to be authorized to access your facebook account.
Step 1: Allow basic (initial) access to your acount via this url:
https://www.facebook.com/dialog/oauth?client_id=42463270450&redirect_uri=http:/
/www.facebook.com/connect/login_success.html
to launch this page, execute: fbcmd go access
Step 2: Generate an offline authorization code at this url:
http://www.facebook.com/code_gen.php?v=1.0&api_key=42463270450
to launch this page, execute: fbcmd go auth
obtain your authorization code (XXXXXX) and then execute: fbcmd auth XXXXXX
These messages explain the steps you need to take next to grant FBCMD
access to your Facebook information.
Making the Facebook Connection
Perform the following connections from a Linux desktop system because
some of these commands use Firefox (or your default browser) to
initiate the connections and setup the application. Open a Terminal and
type in the following commands.
fbcmd go access
Your Internet browser will open to Facebook and prompt you for login.
If you see a link that reads, “Login with Command Line” or something
similar, select that link and login to Facebook. If you don’t see that
link, login to Facebook the way you normally do. Return to your
Terminal window and issue the following command:
$ fbcmd go access
This command prompts another connection to Facebook, where you should
see a six character code that you’ll need for the next step.
fbcmd auth XXXXXX
fbcmd [v1.0-beta5-dev1] AUTH Code accepted.
Welcome to FBCMD, Kenneth Hess!
most FBCMD commands require additional permissions.
to grant default permissions, execute: fbcmd addperm
As instructed, issue the command in the message.
$ fbcmd addperm
launching: https://www.facebook.com/dialog/oauth?client_id=42463270450&redirect
_uri=http://www.facebook.com/connect/login_success.html&scope=create_event,frie
nds_about_me,friends_activities,friends_birthday,friends_checkins,friends_educa
tion_history,friends_events,friends_groups,friends_hometown,friends_interests,f
riends_likes,friends_location,friends_notes,friends_online_presence,friends_pho
to_video_tags,friends_photos,friends_relationship_details,friends_relationships
,friends_religion_politics,friends_status,friends_videos,friends_website,friend
s_work_history,manage_friendlists,manage_pages,offline_access,publish_checkins,
publish_stream,read_friendlists,read_mailbox,read_requests,read_stream,rsvp_eve
nt,user_about_me,user_activities,user_birthday,user_checkins,user_education_his
tory,user_events,user_groups,user_hometown,user_interests,user_likes,user_locat
ion,user_notes,user_online_presence,user_photo_video_tags,user_photos,user_rela
tionship_details,user_relationships,user_religion_politics,user_status,user_vid
eos,user_website,user_work_history
Your FBCMD to Facebook connection is now complete and you’re ready to
use FBCMD. To test that assertion, try the following command to see the
permissions you granted the application.
$ fbcmd showperm
PERMISSION GRANTED?
ads_management 0
create_event 1
email 0
friends_about_me 1
friends_activities 1
friends_birthday 1
friends_checkins 1
friends_education_history 1
friends_events 1
friends_groups 1
...
user_videos 1
user_website 1
user_work_history 1
xmpp_login 0
A ’1′ means permission granted and a ’0′ means permission denied. You
can change permissions at any time by issuing the addperm keyword and a
permission. See the FBCMD [42]Command Documentation for a complete
listing of command keywords and syntax.
Using FBCMD
I can’t show you all of the FBCMD commands but I can show you a few of
the fun ones. You can do almost anything with the command line
interface that you can with the web interface. Your results may vary
but generally speaking everything works pretty well. To see a list of
your friends who are signed into Facebook, use fonline.
$ fbcmd fonline
NAME ONLINE_PRESENCE
Friend One idle
Friend Two idle
Friend Three idle
Friend Four idle
Friend Five active
Friend Six active
Friend Seven active
To see a list of messages that your friends have posted to your wall,
use mywall.
$ fbcmd mywall
[#] NAME MESSAGE
[1] Friend One Hi , Hope you are good
You can read your Facebook messages with the inbox keyword.
$ fbcmd inbox
[#] FIELD VALUE
[1] subject [Hello]
:to/from Friend Four
:snippet Hi, what's up?
To check those annoying event invitations that people send you, use
events.
$ fbcmd events
[#] START_TIME RSVP EVENT
[1] Wed May 25 02:00 not_replied Towel Day - Celebrating Douglas Adams
[2] Sat Jul 16 10:00 declined William Bernhardt Small-Group Seminar
(Level
3)
And, last but not least, you can update your status. You wouldn’t want
anyone to miss any aspect of your fascinating existence or your latest
video game scores.
$ fbcmd post "This is a test post from FBCMD"
POST_ID
1443542993_205008538849
If you’re a PHP programmer, I suggest that you expand and extend this
application by contacting the primary developer. See the [43]Contribute
page for more information.
For those of you who love to use Facebook, you’re sure to love an easy
to install, easy to use command line Facebook application like FBCMD.
FBCMD has a lot of potential as an evolving command line application
that I hope someone incorporates into a repository so that it’s even
easier to install for those who don’t like to install applications.
Those of us who like a challenge are in the minority. Most people just
want something that works and works without hassle or strain. Make it
so, Linux fans.
Kenneth Hess is a Linux evangelist and freelance technical writer on a
variety of open source topics including Linux, SQL, databases, and web
services. Ken can be reached via his website at
[44]http://www.kenhess.com. Practical Virtualization Solutions by
Kenneth Hess and Amy Newman is available now.
Comments on "FBCMD: Command Line for Facebook"
Evropi
This kind of stuff is so, so wrong. What a step back.
Facebook may not be the prettiest of websites but it’s functional.
Switching back to some offline application, especially one in a
bloomin’ terminal is a huge, huge step backwards. This will slow our
Facebook “productivity” if anything. Enough said.
PS: No photos or videos are visible in a command line either, which is
hilarious. Why would you take out so many important parts of Facebook
to make yourself a massive geek who is actually less “productive” with
the website? This just makes the experience less social. Disgusting.
[45]May 21st, 2011 at 4:37 am
[46]Reply
edounn
Just for fun
[47]July 2nd, 2011 at 12:42 am
[48]Reply
dabeed
It’s geek amusement!
[49]August 3rd, 2011 at 4:19 am
[50]Reply
With this we can automate our status updates. We can write scripts
to write posts of wals. We can upload pics without selecting
multiple file one at a time and a lot which you will take too much
time from a web browser.
[51]November 28th, 2011 at 2:14 am
[52]Reply
You obviously spend allot of time looking at pretty pictures and
videos. Start thinking like someone who matters. Someone who wants
to get information on and to customers. People have been hounding
me for automated alerting and communication concerning goods they
have ordered and due-dates for items they have rented. Email is
ok…sms..again works. Allot of people though focus on this most of
the day..(from the sounds of it you are one of them) Now I can
throw your bill right into your face while you are watching that
video you enjoy so much. Get a Life…you probably owe me money…pay
up cause i want that new jet-ski and you owe me. Oh ya and quit the
high-level scrutiny of these things that are obviously beyond your
vision. Simple,clean and efficient. This sort of code is what
handles your pathetic attempts to be social through your computer.
Be grateful someone took the time to work it out for you.
[53]January 18th, 2012 at 11:25 pm
[54]Reply
lol upload 100 pictures with a single line
download all my pictures in 1 second
automated scripts.
nuff said
[55]January 28th, 2012 at 11:46 am
[56]Reply
glindner
Evropi, I think this may have been designed as an extension which
allows FB access for an app you may be writing. Let FBCMD maintain the
API interface and just give/take the text provided to do something with
FB. I don’t think anyone would use this as their direct access to the
FB experience.
I could see using this to monitor my FB feed and streaming a banner on
my television or monitor when an update occurs. Or, as part of a
aggregator which updates FB, Twitter, etc.
[57]May 22nd, 2011 at 8:39 am
[58]Reply
buyerbrown
This looks a interesting.
I have been learning to respect the power behind command line but
having trouble wrapping my mind around this idea.
I Guess:
1. It could be used as a fun command line project showing some other
usage for the command line. (something just for fun)
2. Maybe some folks have no other choice but command line say during
work and would like to update their facebook (but most of us have other
devices with us to do that, and your at work and, should not be doing
facebook anyways, but hey that just me)
3. I could see Glinder’s idea could be useful.
Mostly i would have to agree with Evropi facebook was never meant for
command line usage – its a rich media environment – This app is like
inviting people to a command line 3d movie makes no sense but hey i
don’t know how to program something like this so i cant down the
creativity of it.
maybe the creator can give some more ideas or reasoning behind it
[59]June 1st, 2011 at 5:17 am
[60]Reply
zdwc01
sudo php : command not found…..now what
[61]June 3rd, 2011 at 3:53 pm
[62]Reply
raevin
sudo search google and rtfm
[63]http://www.google.com/search?q=sudo+php+%3A+command+not+found&i
e=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox
-a
[64]June 4th, 2011 at 6:08 am
[65]Reply
dharmrajbind
Not getting connected to fbcmd after running this command:
$ sudo php fbcmd_update.php sudo
Output it shows is:
You are being [66]redirected.
[67]June 7th, 2011 at 1:03 pm
[68]Reply
dharmrajbind
$ sudo php fbcmd_update.php sudo
You are being redirected
[69]June 7th, 2011 at 1:05 pm
[70]Reply
perl2ruby
disclaimer: use these instructions at your own risk
You can install as follows (requires git client and github
account):
git clone git://github.com/dtompkins/fbcmd.git
cd fbcmd
sudo php fbcmd_update.php
sudo php fbcmd_update.php install
fbcmd # will tell you what to do next
fbcmd go access
fbcmd go auth
fbcmd addperm # to grant default permissions to your facebook
account
[71]August 14th, 2011 at 5:58 am
[72]Reply
curl issue.
replace
curl -O
[73]https://github.com/dtompkins/fbcmd/raw/master/fbcmd_update.php
with
wget
[74]https://github.com/dtompkins/fbcmd/raw/master/fbcmd_update.php
[75]February 10th, 2012 at 3:28 am
[76]Reply
Neelamegan
Superb…
But i think many peoples wont wish to browse in command line
[77]June 29th, 2011 at 11:28 pm
[78]Reply
hal736
This is awesome! I just got a pertelian ([79]http://www.pertelian.com/
) and this is exactly what I was looking for. I can use this to throw
data to my pertelian, and watch my facebook feed while doing other
things on my computer.
As for those with the comments about this being a waste, or a step
backwards: what do you think happens in your browser to give you all
those pretty pictures and text and ads? Those are commands being run by
your browser. Some of us like to know what is going on in the
background, and because of that, you get to just use your mouse, and
only need our keyboard to post comments.
[80]August 16th, 2011 at 2:58 pm
[81]Reply
Yep its good to know whats going on..there is also those of us that
want to build web apps that contact customers automatically…to
inform them there ordered stock has come in…or their rented
inventory is due back. So many people think this stuff is all about
what it appears to be. Like everything is supposed to work like the
photo on a cereal box. I have a life..i have a business..i don’t
have time to sit around and bs all day and night with people on
facebook. But I sure do like the idea of getting info to my
customers when and where they are paying attention. It just cracks
me up that anyone would bad mouth something so transparent and
simple. Go back to your cubical and farmvill it up. We on the other
hand will be using the Command line to send you a bill. Bam!
[82]January 18th, 2012 at 11:11 pm
[83]Reply
I have been browsing online greater than 3 hours as of late, but I
never found any attention-grabbing article like yours. It?s beautiful
value enough for me. Personally, if all webmasters and bloggers made
just right content material as you did, the web will likely be much
more helpful than ever before.
[84]November 2nd, 2011 at 5:54 pm
[85]Reply
This is the programm for make the facebook, or this is the programm for
edit….. the command line of facebook….. you can send e-mail to me….
from khmerlinuxboy
[86]November 13th, 2011 at 10:47 pm
[87]Reply
You are a great teacher. By far more helpful and knowledgeable than
most of my professors in college.[88]wood pellet mill
[89]November 17th, 2011 at 7:31 pm
[90]Reply
I don’t even know the way I stopped up here, but I thought this put up
used to be good. I do not understand who you are but definitely you are
going to a well-known blogger if you are not already. Cheers!
[91]November 21st, 2011 at 2:35 pm
[92]Reply
advertising and *********** with Adwords. Well I am including this RSS
to my e-mail and could look out for much more of your respective
fascinating content. Ensure that you update this again very soon..
[93]January 4th, 2012 at 10:34 pm
[94]Reply
I like the valuable information you provide in your articles. I will
bookmark your weblog and take a look at once more here frequently. I’m
reasonably certain I?ll be informed many new stuff right right here!
Good luck for the following!
[95]January 6th, 2012 at 8:44 pm
[96]Reply
I used to be recommended this web site by means of my cousin. I am not
sure whether this post is written by him as nobody else recognise such
certain approximately my problem. You are wonderful! Thank you!
[97]January 7th, 2012 at 12:23 pm
[98]Reply
My brother suggested I might like this website. He was once totally
right. This publish actually made my day. You cann’t believe just how
much time I had spent for this information! Thanks!
[99]January 9th, 2012 at 7:23 pm
[100]Reply
I have been browsing on-line more than three hours nowadays, yet I by
no means discovered any fascinating article like yours. It’s pretty
worth sufficient for me. In my view, if all webmasters and bloggers
made good content material as you did, the web will be much more useful
than ever before.
[101]January 24th, 2012 at 10:46 am
[102]Reply
Hi, Neat post. There is a problem along with your site in internet
explorer, could test this? IE still is the marketplace leader and a
huge element of other folks will leave out your great writing because
of this problem.
[103]January 26th, 2012 at 10:59 am
[104]Reply
I thought I would give those struggling to install and run this AWESOME
app a guideline to what I did on my Ubuntu 11.10 machine.
$ sudo aptitude install php5-cli
$ sudo wget
[105]https://github.com/dtompkins/fbcmd/raw/master/fbcmd_update.php
$ cd fbcmd
$ sudo php fbcmd_update.php
$ sudo php fbcmd_update.php sudo
$ php fbcmd_update.php install
$ fbcmd
$ fbcmd go access //go to facebook
$ fbcmd go auth
[106]February 16th, 2012 at 4:37 pm
[107]Reply
I recommend you advise using apt-get as aptitude is not in a
default install anymore. It will confuse users less.
[108]March 10th, 2012 at 8:18 pm
[109]Reply
I thought I would give those struggling to install and run this AWESOME
app a guideline to what I did on my Ubuntu 11.10 machine.
$ sudo aptitude install php5-cli
$ sudo apt-get install curl
$ sudo apt-get install curl //git and curl installed if you are working
on //rails
$ sudo wget
[110]https://github.com/dtompkins/fbcmd/raw/master/fbcmd_update.php
$ cd fbcmd
$ sudo php fbcmd_update.php
$ sudo php fbcmd_update.php sudo
$ php fbcmd_update.php install
$ fbcmd
$ fbcmd go access //go to facebook
$ fbcmd go auth //go to facebook for auth code
$ fbcmd auth XXXXXX //replace X with auth code
$ fbcmd addperm
Follow the rest of the article and enjoy!
[111]February 16th, 2012 at 4:50 pm
[112]Reply
My brother suggested I may like this web site. He was totally right.
This put up actually made my day. You cann’t believe just how much time
I had spent for this information! Thanks!
[113]February 18th, 2012 at 12:25 pm
[114]Reply
Whats up very nice web site!! Man .. Excellent .. Superb .. I’ll
bookmark your site and take the feeds also?I’m happy to seek out
numerous helpful information here in the put up, we want develop extra
strategies in this regard, thank you for sharing. . . . . .
......
Refs:
....
40. http://fbcmd.dtompkins.com/
41. http://www.linux-mag.com/id/7695/
42. http://fbcmd.dtompkins.com/commands
43. http://fbcmd.dtompkins.com/contribute
44. http://www.kenhess.com/
45. http://www.linux-mag.com/id/8705/#comment-9525
46. http://www.linux-mag.com/id/8705/?replytocom=9525#respond
47. http://www.linux-mag.com/id/8705/#comment-9651
48. http://www.linux-mag.com/id/8705/?replytocom=9651#respond
49. http://www.linux-mag.com/id/8705/#comment-9874
50. http://www.linux-mag.com/id/8705/?replytocom=9874#respond
51. http://www.linux-mag.com/id/8705/#comment-60033
52. http://www.linux-mag.com/id/8705/?replytocom=60033#respond
53. http://www.linux-mag.com/id/8705/#comment-124929
54. http://www.linux-mag.com/id/8705/?replytocom=124929#respond
55. http://www.linux-mag.com/id/8705/#comment-133673
56. http://www.linux-mag.com/id/8705/?replytocom=133673#respond
57. http://www.linux-mag.com/id/8705/#comment-9526
58. http://www.linux-mag.com/id/8705/?replytocom=9526#respond
59. http://www.linux-mag.com/id/8705/#comment-9551
60. http://www.linux-mag.com/id/8705/?replytocom=9551#respond
61. http://www.linux-mag.com/id/8705/#comment-9553
62. http://www.linux-mag.com/id/8705/?replytocom=9553#respond
63. http://www.google.com/search?q=sudo+php+%3A+command+not+found&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
64. http://www.linux-mag.com/id/8705/#comment-9554
65. http://www.linux-mag.com/id/8705/?replytocom=9554#respond
66. https://raw.github.com/dtompkins/fbcmd/master/fbcmd_update.php
67. http://www.linux-mag.com/id/8705/#comment-9558
68. http://www.linux-mag.com/id/8705/?replytocom=9558#respond
69. http://www.linux-mag.com/id/8705/#comment-9559
70. http://www.linux-mag.com/id/8705/?replytocom=9559#respond
71. http://www.linux-mag.com/id/8705/#comment-9981
72. http://www.linux-mag.com/id/8705/?replytocom=9981#respond
73. https://github.com/dtompkins/fbcmd/raw/master/fbcmd_update.php
74. https://github.com/dtompkins/fbcmd/raw/master/fbcmd_update.php
75. http://www.linux-mag.com/id/8705/#comment-145971
76. http://www.linux-mag.com/id/8705/?replytocom=145971#respond
77. http://www.linux-mag.com/id/8705/#comment-9625
78. http://www.linux-mag.com/id/8705/?replytocom=9625#respond
79. http://www.pertelian.com/
80. http://www.linux-mag.com/id/8705/#comment-9985
81. http://www.linux-mag.com/id/8705/?replytocom=9985#respond
82. http://www.linux-mag.com/id/8705/#comment-124915
83. http://www.linux-mag.com/id/8705/?replytocom=124915#respond
84. http://www.linux-mag.com/id/8705/#comment-18007
85. http://www.linux-mag.com/id/8705/?replytocom=18007#respond
86. http://www.linux-mag.com/id/8705/#comment-37983
87. http://www.linux-mag.com/id/8705/?replytocom=37983#respond
88. http://www.pelletmillguide.com/
89. http://www.linux-mag.com/id/8705/#comment-44281
90. http://www.linux-mag.com/id/8705/?replytocom=44281#respond
91. http://www.linux-mag.com/id/8705/#comment-50701
92. http://www.linux-mag.com/id/8705/?replytocom=50701#respond
93. http://www.linux-mag.com/id/8705/#comment-111861
94. http://www.linux-mag.com/id/8705/?replytocom=111861#respond
95. http://www.linux-mag.com/id/8705/#comment-113737
96. http://www.linux-mag.com/id/8705/?replytocom=113737#respond
97. http://www.linux-mag.com/id/8705/#comment-114397
98. http://www.linux-mag.com/id/8705/?replytocom=114397#respond
99. http://www.linux-mag.com/id/8705/#comment-116623
100. http://www.linux-mag.com/id/8705/?replytocom=116623#respond
101. http://www.linux-mag.com/id/8705/#comment-129025
102. http://www.linux-mag.com/id/8705/?replytocom=129025#respond
103. http://www.linux-mag.com/id/8705/#comment-131427
104. http://www.linux-mag.com/id/8705/?replytocom=131427#respond
105. https://github.com/dtompkins/fbcmd/raw/master/fbcmd_update.php
106. http://www.linux-mag.com/id/8705/#comment-149939
107. http://www.linux-mag.com/id/8705/?replytocom=149939#respond
108. http://www.linux-mag.com/id/8705/#comment-163093
109. http://www.linux-mag.com/id/8705/?replytocom=163093#respond
110. https://github.com/dtompkins/fbcmd/raw/master/fbcmd_update.php
111. http://www.linux-mag.com/id/8705/#comment-149945
112. http://www.linux-mag.com/id/8705/?replytocom=149945#respond
113. http://www.linux-mag.com/id/8705/#comment-151021
114. http://www.linux-mag.com/id/8705/?replytocom=151021#respond
....
</snip>
--
--
CarrefourBLinuX MailingListe
Pour obtenir de l'aide, envoyez le sujet help �
carrefourblinux-request@xxxxxxxxxxxxxxxxxxx
Archives:
http://listengine.tuxfamily.org/lists.tuxfamily.org/carrefourblinux