How to Integrate Tumblr API in PHP

tumber api integration php
Tumblr is the most popular social platform for setting up your blogs. Tumblr has provided Tumblr API to make any operation on your Blogs. In this article, I am explaining the simplest procedure to integrate Tumblr API.

Steps to Configure Tumblr API with PHP

First register an app to get the consumer key and secret. Click the link below

https://www.tumblr.com/oauth/register

You will see the form like below:

tmblr1

The administrative contact email field will contain the email id registered with your Tumblr account. Provide a valid value in Default callback URL

Application Website, App Store URL, and Google Play Store URL can be left blank at the moment. And submit the form. On the next page, you will get your OAuth Consumer key and secret key.

tmblr2

Just save these for future use.

Now to obtain, Oauth token and token secret, go to the following URL:

https://api.tumblr.com/console/calls/user/info

tumblr3

Here input your Consumer Key and Consumer Secret and click Authenticate to get the OAuth token and token secret along with PHP code to set up the authentication.

tumblr4

If keys are not shown, you can see those by clicking the show keys button on the top.

Now Lets us Start Some Coding Work

To get the API code, you just need to get the PHP repository available at GitHub. But the best way to get this code to install this repository using composer as i did.

You May Also Like:

How to Make Soap Client Call in PHP
Create and Save XML file Using MySQL Data in PHP
Configure Intercom API in PHP and Create New User in It
GitHub Tutorial: Commit, Push And Go
How to Integrate Instagram API into Website
How to Create Rss Feed Script Using PHP and MySQL

Open the command prompt and go to the path where you want to install the repository and type the command

php composer.phar require tumblr/tumblr

This will install the Tumblr repository at your system along with required dependencies (inside C:\xampp\htdocs\tumblr directory, in my case.) Now on the root path, create “sample.php” with the following code:

This will get you the basic information about the Tumblr user. Likewise, you can make any other operation on your blog(s) by following the Tumblr api documentation.

Hope this article would benefit you. Please share if you like this article. Thanks

Recommended Posts For You

About Manish Kumar

I am PHP web developer and blogger.

View all posts by Manish Kumar

Leave a Comment

Your email address will not be published. Required fields are marked *