Skip to content

Instantly share code, notes, and snippets.

@segebee
Created April 14, 2015 16:18
Show Gist options
  • Save segebee/bfa52e52a203abadeed1 to your computer and use it in GitHub Desktop.
Save segebee/bfa52e52a203abadeed1 to your computer and use it in GitHub Desktop.
Facebook Birthday Auto Poster
var textInput = document.getElementsByClassName("textInput");
for (var i = 0; i < textInput.length; i++)
{
textInput[i].value = "Happy Birthday!";
//pending - press the enter key via javascript so facebook sends birthday wish
// Create new event
//var e = document.createEvent('KeyboardEvent');
// Init key event
//e.initKeyEvent('keydown', true, true, window, false, false, false, false, 13, 0);
// Dispatch event into document
//textInput[0].dispatchEvent(e);
}
@anextro
Copy link

anextro commented Apr 15, 2015

Its preetty simple if you want to run it from the command line. The last thing is to simulate enter.
What are your thoughts on a facebook app for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment