Skip to content
/ ffid Public

Find Facebook ID: a shell command to find user's Facebook ID.

Notifications You must be signed in to change notification settings

Datalux/ffid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

ffid

Find Facebook ID: a shell command to find user's Facebook ID.

Installation

Create or edit the RC File of your shell (~/.bashrc if you use Bash or ~/.zshrc if you use ZSH) (for MAC users edit ~/.bash_profile file instead ~/.bashrc. file) and append the following code:

ffid() {

   if [ -z "$@" ]
   then
   	>&2 echo "ffid: no nickname specified!"
   else
       cmd=$(curl -s https://www.facebook.com/${@} | grep -o 'entity_id[^[:blank:]]*' | awk -F':' '{print $2}' | awk -F '}' '{print $1}')
       if [[ -n $cmd ]]; then
           echo "$cmd"
       else
           >&2 echo "ffid: invalid nickname. Usage: ffid <facebook nickname>" 
       fi
   fi
}

alias ffid=ffid 

Now restare your terminal.

Usage

Just run:

$ ffid <facebook nickname>

About

Find Facebook ID: a shell command to find user's Facebook ID.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages