No, it's optional, however It won't pass validation using some online tools, like the Open Graph Object Debugger by Facebook.
It's only needed by Facebook to get analytics data.
Where do I get the Facebook application ID?
- Login in your Facebook account
- Create a new application at https://developers.facebook.com/apps/
- Type a display name and contact email for your application
- Click on "Create App ID" and solve the captcha
- Click in the App ID, located in the upper right of the page, to copy it in the clipboard