Social Sharing from the Server-Side

Mobile apps often let users share image, video, text, and link into social networks, such as Facebook or Twitter, and via email.

In several recent PhoneGap projects, I found it useful to do the sharing from the server-side. A user will authenticate with the social network via the app, or provide details of the recipient of the email message. After we have obtained the required access token (for Facebook), we would request the server-side to share to the social network or send the email message via a mailer service such as Mailgun.

The reason it is easier to share in a PhoneGap app from the server-side is that images are not downloaded to the app as a binary file. In any table views or image views, we use links to images or videos on the server-side. So instead of downloading the image just for the purpose of sharing, we just ask the server to do it.