You might be wondering how a third person could execute a call upon receiving tokens. Actually, it is ridiculously easy. This can be done in JavaScript using the Web3 library provided by Ethereum. The following is a smart contract shown on remix. We have explored remix earlier:
This just increments an integer, checks whether it's less than 10, and returns true if it is; it returns false otherwise. You can just use JavaScript VM for this problem. On compiling and running, if you click the SampleFunc, there will be a new entry added in the gray area. If you click on Details, you will see an input entry—you can copy this. This will be your third parameter for this function. You can execute this like any other function.
Now, if you send tokens using the ERC827 smart contract, this function will be executed.
But what...