In the previous article, we learned how to create a Facebook app, authenticate a user and access his basic information like email and friends. Now in this second part of the tutorial series, we will learn how to publish status/photo through Graph API. For this tutorial, we would need to ask for two more permissions i.e publish_stream, user_photos.
If using Facebook Login Button
<div class="fb-login-button" autologoutlink="true" data-show-faces="false" data-width="200"
data-max-rows="1" size="medium" scope="email,publish_stream,user_photos">
If using FB.login method