Post to social media

Hello all
I started to develop an app to post items to social medias like Facebook, Twitter, Pinterest.
anyone does this before?
I tried to post on Facebook page using graph api and javascript sdk but couldn’t succeed.
please guide me.