Sunteți pe pagina 1din 4

Enable Twitter

First of all we’ll need to register an app for you on Twitter so that you get your API
keys you’ll use.

After reading that previous statement a question might have taken birth in your
mind, What’s the purpose of getting these API Keys from Twitter?

We need the API Keys for getting our Application (app) registered on Twitter so
that Twitter gives us the right to get the users/visitors authenticated and get their
credentials/profile info from Twitter. With the increasing number of Twitter account
frauds these days, I think that oAuth is the best step taken by Twitter towards user
security. Also, the API keys let Twitter know of the URL where the user will be
redirected to after successful authentication/login.

So for that (getting our app registered on Twitter) go to https://dev.twitter.com/apps.


Note that you’ll need to login with your Twitter account to register an APP. The
registration page that twitter provides is like the one below. I’ll describe everything
as we go on!
I have explained the form on the screenshot above so I strongly advise you to have
a close look to the form and see what to fill. Below, I have explained all the
elements of the file;

 Application Icon: If you want to give a pictorial representation to your app then
this is the way!
 Application Name: Your application’s name. Be ultra-sure to make it catchy!
 Description: A small description for your application.
 Application Website: A direct link to your application’s website. (For reference)
 Organisation: Your organisation {Your may name your website here}, although
not needed.
 Website: Your Organisation’s website {Your main homepage}, not needed {just for
reference}
 Application Type: This will probably be Browser unless you use Twitter oAuth in a
software.
 Callback URL: The URL where Twitter should redirect a user after successful
authentication! {See the screenshot for more}
 Default Access Type: It should be Read & Write unless you just need to use the
profile information of a user.
 Use Twitter for login: If you are using Twitter as a Login to your
website/application then check this otherwise no need!
 Captcha: Just a captcha and is required!

After that just click on Save and you’ll be redirected to a page where Twitter will
give you your API info. in the form of a Consumer Key & the Consumer Secret Key.
The page will look something like the one below:
Create Access token

Copy the four values to corresponding variables in the php file

S-ar putea să vă placă și