Top 10 Social Media APIs for Developers

The Guide to Social Media APIs

Geoffrey Bourne
7 min readAug 12, 2020

--

Here is the scenario: you’ve been tasked with sending event-driven posts to various social media networks like Facebook, Twitter, LinkedIn, or even newer ones like Telegram, Discord, or Reddit. Building the front-end functionality to share to these networks is easy, and there are a dozen packages/plugins for WordPress, React, or Javascript. However, if you need to dynamically share content from your back-end system, well, that means you need to register, be approved, and integrate with each social network.

Building Ayrshare wasn’t easy and we found it took a lot of leg-work to find details on the various social media network APIs, so we decided to share what we found. Here are the top networks, links to their API, guides, and process. The APIs can be called directly as RESTful services or search for a well-regarded wrapper for the API in the language of your choice. Most of the APIs use OAuth2 for authentication.

Top 10 Social Media Network APIs

Facebook

  • API
  • Implementation Rating: HARD — API large, documentation not great, need to create a video to be approved.
  • Requires registration: Yes
  • Requires app approval: Yes

Thoughts

  • You need to register your app, and if for commercial purposes, register your business. This includes verifying your legal entity and address. A lot of the Facebook process and requirements are similar to releasing an app to the Apple store.
  • Scope permissions are extremely important and don’t be surprised if you get them wrong during the first few builds.
  • The API documentation is large and confusing at times, but if you spend the time learning it you’ll find the information you need.
  • We didn’t find any good packages that wrap the API calls, so we used direct RESTful calls.
  • You can get a permanent access token. However, it requires a few extra calls.
  • The Facebook approval process for scope permissions is the most rigorous of any network. You need to write up testing steps, submit a video, and detail your reasoning for needing the permissions. We were rejected once because our video missed a step in our instructions.

Other guides or packages

Twitter

  • API
  • Implementation Rating: OK — if use a package such as twitter-lite, otherwise Hard. Documentation weak with poor examples.
  • Requires registration: Yes
  • Requires app approval: Yes

Thoughts

  • Twitter requires registering your app as a new project (using their new Developer interface). Approval takes a few days, and although we were supposed to get an approval email we never did.
  • The API’s examples could be a bit more detailed. Fortunately the Twitter API is not complex. We found some great Twitter API wrappers, so we suggest using one of those. See packages below.
  • You can get a permanent access token. This greatly simplifies your token management.
  • The new Twitter developer site no longer allows localhost in their approved callback URLs, so you’ll need to use ngrok or an equivalent tunnel to test locally.

Other guides or packages

LinkedIn

  • API
  • Implementation Rating: HARD — Documentation all over the place and mixing v1 and v2 examples. A long and confusing approval process if want to post to Pages.
  • Requires registration: Yes
  • Requires app approval: Yes

Thoughts

  • LinkedIn’s API documentation is sufficient, but don’t get confused with v1 and v2. If you search in Google you sometimes get v1 docs, which you don’t want.
  • Scopes are important for LinkedIn and have different approval workflows. We unfortunately never found a single document detailing the scope, but went through all the endpoints to see what they need.
  • Access tokens last 60 days, so you’ll need to refresh after that.
  • If you only need to post to a user’s own feed, just request permissions to SignIn with LinkedIn.
  • If you need to post to a company page, you’ll need to request access to the Marketing Developer API. You’ll need to fill out a form and wait for approval. Two important scopes to include to read and publish to corporate pages are: w_organization_social rw_organization_admin.
  • We used the direct RESTful endpoints since we didn’t find any wrapper packages we liked.

Other guides or packages

Reddit

  • API
  • Implementation Rating: EASY — while you need to call the APIs directly and the API documentation is auto-generated (a mess), the calls are very simple and straightforward.
  • Requires registration: Yes
  • Requires app approval: Yes, only if for commercial use.

Thoughts

  • Reddit’s API docs are auto-generated and a mess. The information is there, but it will take you a while to get a handle on them. We suggest checking out the subreddit on development (see other guides section).
  • Reddit requires you register your app to get the API keys and to complete a Google form for approval if your app is commercial. Don’t forget to do this.
  • Subreddit’s have different rules, so don’t blindly post to them or you/your user will be banned. To test your implementation post to the /test subreddit.
  • The other networks allow you to get long-lived or permanent access tokens. Reddit’s access token only lasts 1 hours. You can refresh the token even after expiration and some of the wrappers help manage this.
  • There are some really great looking wrapper packages. Go to the /redditdev subreddit and see the drop down for packages. However, we still preferred to go directly with the API calls.

Other guides or packages

Discord

  • API
  • Implementation Rating: OK — straightforward OAuth with a nice developer GUI, and wrapper packages.
  • Requires registration: Yes
  • Requires app approval: Yes

Thoughts

  • You must register an app to get your client id and secret key, but the process is quick and easy.
  • You then need to register a Bot. Please see the guide for scope permissions and authorization code.

Other guides or packages

Pinterest

  • API
  • Implementation Rating: Unknown — Pinterest’s API approval is backlogged and they do not know when approvals will occur.
  • Requires registration: Yes
  • Requires app approval: Yes and new applications are slow to process.

Thoughts

  • Pinterest has a new API and you must apply for access. If you don’t hear back after a week, write them a note asking if you can provide more information, but they are currently backlogged.

Other guides or packages

Instagram

  • API
  • Implementation Rating: HARD — Only difficulty is needing a mobile app to post. No backend API publishing of images unless you are a Partner.
  • Requires registration: Yes
  • Requires app approval: Yes, but need to be in the Partner program (closed for new partners) to post via the API.

Thoughts

  • Instagram has switched to the Facebook Open Graph API format, so if you’ve already built for FB you’ll be familiar with the format. You’ll need to manage scopes as you do for FB.
  • The API allows you to pull data, but you can not post via the API unless you’re a “Partner”. The partner program started in 2018 and isn’t open to new partners unless Instagram asks you to join.
  • If you want to post to Instagram you’ll need to have a mobile app that does the post, requiring a manual step from your users.

Other guides or packages

Telegram

  • API
  • Implementation Rating: EASY — A breeze. The process, calls, and documentation is excellent.
  • Requires registration: Yes
  • Requires app approval: Yes,and need to create a bot.

Thoughts

  • You must register your bot with BotFather via Telegram. All the setup is via Telegram, such as setting your image, description, and registering.
  • We found the documentation and API endpoints the easiest to use of any network. It was our quickest integration.
  • Unlike other networks that offer an front-end user authorization workflow, such as Facebook, Telegram requires the user to authorize your bot in their group or channel. A few extra steps for the user, but with proper instructions, very manageable.
  • Telegram offers a nice set of Webhooks that update you whenever a new chat comes in.

Other guides or packages

Medium

  • API
  • Implementation Rating: Unknown — We have not completed the implementation, but all indications point to easy.
  • Requires registration: Yes
  • Requires app approval: Yes, and must email Medium to request access: yourfriends@medium.com

Thoughts

  • You must email the address above asking for permissions. Keep checking your Medium account -> settings -> developers for the ability to create a new app. Create your app and get your client id and secret key.

Other guides or packages

Tumblr

  • API
  • Implementation Rating: Unknown — We have not completed the implementation, but all indications point to easy.
  • Requires registration: Yes
  • Requires app approval: Yes

Thoughts

  • You must register your app with Tumblr. The process is quick with immediate approval.

Other guides or packages

If you don’t want to go through all the API approvals, integrations, and maintenance, check out Ayrshare with its powerful set of APIs that enable you to send social media posts effortlessly.

--

--

Geoffrey Bourne

Co-Founder of ayrshare.com — an API-first platform to automate your social media posts with a few lines of code.