Pinterest Stumbleupon Whatsapp
Ads by Google

Imagine opening up a command window on your PC, typing a single line command, and posting instantly to Facebook without even opening up a browser or other app.

It’s definitely the fastest way to post to Facebook, but how do you set it up? And why not just use the tried and true method everyone always used to use called FBCMD Update Facebook Quickly From Your Desktop With FBCMD Update Facebook Quickly From Your Desktop With FBCMD I have to admit that I'm a huge fan of Facebook. Since I'm almost always working on the computer, it's one of the fastest ways that I can stay up to speed with what's going... Read More , created by Dave Tompkins over at the University of British Columbia?

Well, the truth is that as of April 2015, FBCMD died. Not only did Dave quit updating the program, but Facebook made enough changes that it completely broke the functionality of the app.

What Happened to FBCMD?

According to a statement made by Dave Tompkins at his project website, he hinted at a combinations of reasons for ending the project — partly to do with personal time management concerns, but partially to do with changes with Facebook itself.

curl-facebook1b

What made me discover Dave’s statement was the fact that I could no longer get FBCMD to authenticate Access Facebook From The Linux Command Line Access Facebook From The Linux Command Line Virtually everyone, especially in first world countries, is on Facebook. Friends, events, pictures, and plenty more are all commonly found on Facebook unlike any other location. However, an ultimate geek may not want to use... Read More . Every time I attempted to authenticate, I received a strange new error code. Here’s what he wrote:

Ads by Google

“I started this project in 2007, when both Facebook and I were very different.

  • I am now raising a family and have a demanding job. When I do get precious “free” time, there are other projects I’d rather spend my time on.
  • I stopped using FBCMD myself. I log in to Facebook once a week and lurk around for a bit, but I rarely interact or share anything.
  • Facebook is moving away from apps that have broad access and permissions.
  • It was too frustrating to keep up with Facebook perpetually deprecating features and changing its API.

The straw(s) that broke the camel’s back were: deprecating API 1.0, removing offline_access and changing the authentication model.”

Another useful application, providing users with easier access to the social network 5 Ways to Easily Access Social Networks From a Single App 5 Ways to Easily Access Social Networks From a Single App Nowadays, we’re spread pretty thin on all the social network accounts that we have: Facebook, Twitter, Google+, LinkedIn, Tumblr, etc. so managing them can either take a considerable amount of time, or they just don’t... Read More from anywhere, bites the dust. Thanks a lot, Facebook.

Post to Facebook From Command Prompt

Have no fear! Just because FBCMD is dead doesn’t mean you are not able to post to Facebook from a command prompt. In this article I’ll show you how to do it using a “curl” command on either Windows or Linux, and IFTTT to pass the command on to Facebook.

Step 1: Download and Install Curl for Windows

If you’re doing this on a Windows PC, you’re going to need to install curl from the project’s website.

The best bet is to go with the Download Wizard, which lets you choose what operating system and other details so that you get the right installation file.

curl-facebook1

In the case of Windows, you’re likely to get a zipped download with several versions for 32-bit or 64-bit Windows.

curl-facebook3

It’s worth opening a command prompt and testing each one to see which version works on your system (there are two for 64-bit, but only one version for 32-bit). See the installation instructions below to see how to test if it works.

Once you find the working version, copy it to a local directory. In my case, I just created a folder called c:\curl\ and put all of the files in there.

curl-facebook2

How do you know if CURL works? All you have to do is open a command prompt, navigate to the directory where your files are stored, and type “curl.exe”.

curl-facebook4

If you get the response above, then you know it works.

As one more test, type the command followed by any website. If curl works on your system, you should get the page HTML back. This is what it looked like after I typed “curl http://www.makeuseof.com”.

curl-facebook5

Once you know it’s working, you’re going to want to ensure curl is always configured to work every time you start up your computer Analyze Your Auto-Startup Programs Easily With AutoStart Explorer Analyze Your Auto-Startup Programs Easily With AutoStart Explorer Read More .

Doing this is actually pretty easy. Go into Task Manager by clicking on Run and and typing “taskmgr”.

curl-facebook1c

In Task Manager, click the Startup tab, click on File from the menu and choose Create New Task.

In the Open: field, type in the path where you placed the curl executable. In my case that’s “c:\temp\curl\curl.exe”

curl-facebook6

So that you can run your command anywhere and from any directory, you’re going to want to set “c:\temp\curl\” as an environment variable. You can do this by going into the Control Panel, clicking on System and then clicking on the Advanced tab.

Click on the Environment Variables button, under the system variables pane, scroll down the the Path variable. Double click on this so that the Edit System Variable popup appears. At the end of the long Variable value string, append the path where your curl executable is stored, preceded with a “;”.

curl-facebook7

Now, just reboot your computer, and Curl is not configured to launch whenever your computer starts. You can run Curl commands from any command prompt at this point.

Step 2: Configure IFTTT Maker Channel

Now it’s time to set up a Maker Channel on IFTTT IFTTT Now Connects to Anything: Introducing the Maker Channel IFTTT Now Connects to Anything: Introducing the Maker Channel The potential uses for IFTTT are endless. But until now, it's been difficult to interface it with your own hardware projects. Today, that's all changed. Read More to receive your Curl POST command. The steps to set up a Maker Channel on IFTTT are really well laid out on the Maker Channel page of IFTTT.

Here is the key line on that page. You need to make sure that you use the syntax shown on the page in the command that you type on your computer.

curl-facebook8

The “{event}” bit is the name of the event that you’ve created in your Maker channel (see below). The key at the end is the long key code that you’ll see on the Maker Channel page.

So, when you create a new recipe with the Maker Channel as a trigger, you need to name the event, and then make note of what you called it. In this case I created an event called “post_facebook” that I’ll use to create a new post on Facebook.

curl-facebook9

The Facebook trigger I chose is obviously to create a new status message on my timeline.

Further down in the recipe, you’ll see that you can issue the exact message you want by sending the recipe a value labeled “value1”. You need to define this in the Status message field when you’re creating your recipe.

curl-facebook10

Now that your IFTTT recipe is ready and waiting for your incoming POST command via the Maker channel, you’re good to start posting to Facebook 10 Ways to Update Facebook & Twitter Simultaneously 10 Ways to Update Facebook & Twitter Simultaneously Read More with the command prompt!

Step 3: Post Using CURL Commands

For the Maker channel to correctly recognize your POST command, you need to format it correct. Place the event name in the correct position in the URL. As you can see below, my event name is “post_facebook” with the key pasted after the “/key/” part of the URL.

curl-facebook11

The post text is important to get right. Since this is going over as a URL string, you can’t just put spaces where spaces would normally go. The trick to get around that is inserting “%20” everywhere in your post where a space would go.

To post “My first post using a curl command” to my Facebook timeline, my CMD command looks like this:

curl-facebook12

And almost immediately, my command prompt initiated post appeared on my Facebook timeline, just like that.

curl-facebook13

Now, if you think about it, posting to Facebook via a command line is only the beginning of some really cool stuff.

You could easily create batch jobs Dip Your Toes in Batch File Programming for Windows Dip Your Toes in Batch File Programming for Windows Why do you let simple, repetitive tasks bore you? If you can't delegate, innovate! With Windows you can create simple little programs, called batch files, that will take care of these tiresome tasks. Read More to run on your PC automatically, that posts anything you like on a fixed schedule. Better yet, use Windows Scripting Better Than Batch: A Windows Scripting Host Tutorial Better Than Batch: A Windows Scripting Host Tutorial Read More or a VBA macro How You Can Make Your Own Simple App With VBA How You Can Make Your Own Simple App With VBA For those of you that would really love to be able to write your own application, but have never typed a single line of code before, I'm going to walk you through making your very... Read More in Excel or Word to kick off automated Facebook posts!

The possibilities are endless, and we may explore a few creative integrations using this approach in some upcoming posts. Want to see any specific ones? Request them in the comments section below! Let’s talk about the cool things you can now do that you can post to Facebook from the command line, even without FBCMD.

  1. Diego C
    July 15, 2016 at 9:30 pm

    I Want to see any specific ones

  2. Pablo
    April 2, 2016 at 2:50 am

    I have two questions:
    1. Can this be used to upload images?
    2. Can this be used to post to groups?

Leave a Reply

Your email address will not be published. Required fields are marked *