Quantcast
Channel: FineTechCode | Latest Technology & Code Snippets » final year projects
Viewing all articles
Browse latest Browse all 15

Auto Tweet Script with AOuth using PHP

$
0
0

Auto Tweet Script with AOuth using PHP

Recentlly i have dveloped an Auto Tweet Script with AOuth using PHP  and run this application using Cpanel cron job in a particular interval of time.In this post i will explain you how to make your auto tweet application with full functionality.

First you have to REGISTER YOUR APPLICATION ON TWITTER .After registration you will get permission to access your twitter account.At the time of registering you will be provided the Consumer Key and Twiiter OAuth key etc. 

What’s the purpose of  getting  API Keys from Twitter?

We need  API keys for getting our app (application) being registered on Twitter so that twitter can give us right to get visitors/users profile/authentication and theirs credentials. According to me Twitter oAuth is the best way taken by twitter to ensure security

So for that  go to http://twitter.com/apps. Note to register  an app you will need to login in twitter with your twitter account .that you’ll need to login with your Twitter account to register an APP.

During Registering you have to fill many fields ,So i have explained all the elements of the file;

  • Application Icon:It is a simple a image or logo which will shown at top of app.It represents your app,you can change it after register.
  • Application Name: In this field you to write your application name ,it must be eye-catchy.So decide it before registering.
  • Description: In thie field you can give small description of your application.you can specify your application objective or tagline or any other little content.
  • Application Website: It is ordinary field but i recommend to fill it as required.in it you gives the home page of your website.
  • Organisation: What is name of your organization ,you have to specify it in this field.
  • Website: Your Organisation’s website {Your index or main homepage},just for reference
  • Application Type: In this field you have to select the one check box from Browser or client.
  • Callback URL: This field must be filled very carefully because it tells the path where twitter redirects users after successful authentication.
  • Default Access Type:This field should be Read & Write unless you need to use the user’s profile information .
  • Use Twitter for login: In case of when you are using Twitter as a Login to your application/website then check this otherwise no need!
  • Captcha: That is the most important and creates problem to many peoples so fill it carefully.

After that just click on Save and you automatically redirected to a page where you will find the API info .Write these secret keys in a safe page because you need it after in your code to fill .You need it in the Auto Tweet Script.

PREPARING TO MAKE THE APPLICATION

Now you have get the API keys so you shuold try to fill it in the code .

1<?php
2$consumer_key = '<Put YOUR CONSUMER KEY HERE>';
3$consumer_secret = '<Put YOUR CONSUMER SECRET KEY HERE>';
4?>

Example :

1<?php
2$consumer_key = 'vUztW1klsj221HktEoi1MD3hxg';
3$consumer_secret = '8R7gXaKakjnjckGfHHjtMxj6ennJMd0c8hesDP4nCsKjiJAk';
4?>

 

You can download the project from the bellow button:

auto tweet

The post Auto Tweet Script with AOuth using PHP appeared first on FineTechCode | Latest Technology & Code Snippets.


Viewing all articles
Browse latest Browse all 15

Latest Images

Trending Articles





Latest Images