Question: How can I have a button on my webpage that shares the link the user is viewing automatically to his or her facebook timeline? 
For eg if he or she is in mypage.com/aboutme then the link will be shared on his or her facebook timeline when clicked...

Answer: 
Call it on page load.

```
window.onload = function(){
   myFunction();
}

```
Call the function after page is loaded.

```
<body onload="myFunction()">

```