SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Eden Twitter

 Go to http://dev.twitter.com
              AND
http://eden.openovate.com/download
Eden Twitter

//include eden
Include ‘eden.php’;

//twitter credentials
$key = ‘[some random characters]’;
$secret = ‘[some random character]’;
Instantiate Twitter Auth

//twitter auth
$auth = eden(‘twitter’)->auth($key, $secret);
Get Request Token
//getting request token
//for authentication
$token = $auth->getRequestToken();
//login url
$url = $auth->getLoginUrl(
    $token[‘oauth_token’]);
Twitter Access Token

//getting access token
$access = $auth->getAccessToken($_GET[‘oauth_token’],
      $token[‘oauth_token_secret’],
      $_GET[‘oauth_verfier’]
      );
Twitter Get User Info

//instantiate twitter user
$user = eden(‘twitter’)->users($key, $secret,
     $access[‘oauth_token’],
     $access[‘oauth_token_secret’]);
Get User Info

//get info of authenticated user
$info = $user->getCredentials()
Post a tweet
//Instantiate tweet
$tweet = eden(‘twitter’)->tweet($key, $secret,
     $access[‘oauth_token’],
     $access[‘oauth_token_secret’]);
Post a Tweet

//send tweet
$tweet->tweet(‘[YOUR TWEET]’);
Post a Tweet with Image

//image syntax
$img = “@{$_FILES[‘image’][‘tmp_name’]};”.
    “type={$_FILES[‘image’][‘type’]};”.
    “filename{$_FILES[‘images’][‘name’]}”;
Post a Tweet with Image

//send tweet with image
$tweets->tweetMedia([YOUR-STATUS], $img);
Eden Paypal

Goto http://developer.paypal.com
Eden Paypal
//Include Eden
include(‘eden.php’);
Instantiate Paypal Check Out
$paypal = eden()->Eden_Paypal()
   ->checkout(‘[user-email]’,
   ‘[password]’,
   ‘[signature]’,
   ‘[certificate file path]’,
   boolean);
Eden Paypal Checkout
//Prepare checkout data
$checkout = $paypal->setAmount(‘[amount]’)
     ->setItemAmount(‘[amount]’)
     ->setCurrency(‘[amount]’)
     ->setItemName(‘[Item Name]’)
     ->setItemDescription(‘[Item Description]’)
     ->setQuantity(‘[quantity]’);
Eden Paypal Checkout

//Prepare checkout data
$checkout = $paypal->setAmount(100)
     ->setItemAmount(100)
     ->setCurrency(‘PHP’)
     ->setItemName(‘Nike Shoe’)
     ->setItemDescription(‘Amazing nike shoe’)
     ->setQuantity(1);
Eden Paypal Get Token

//get response
$response = $checkout
     ->getResponse(‘[success url]’,
      ‘cancel url’);
Eden Paypal Get Token
//get response
$response = $checkout
     ->getResponse(‘http://clark.com?success’,
      ‘http://clark.com?cancel’);
Eden Paypal getResponse
//getResponse returns
Array(‘[TOKEN ]’ => ‘[Some Random character]’,
     ‘[timestamp]’ => ‘date’,
     ‘[CORELATIONID]’ => ‘[some random character]’,
     ‘[ACK]’     => [Success or Failure]
     …);
Eden Paypal Redirect to paypal

//this will redirect to paypal
$checkout->setToken([token], true);
Get information of payment
//getting payment information
$info = $checkout->setToken([token])
    ->setAmount(‘[amount]’)
    ->setCurrency(‘[currency]’)
    ->getTransactionId(‘[PayerID]’);
Use Eden on all of My Projects

            OR
Code From Scratch?
Eden twitter

Weitere ähnliche Inhalte

Was ist angesagt?

Storybird resource part_2
Storybird resource part_2Storybird resource part_2
Storybird resource part_2Eric Brace
 
Nette framework (WebElement #27 lightning talk)
Nette framework (WebElement #27 lightning talk)Nette framework (WebElement #27 lightning talk)
Nette framework (WebElement #27 lightning talk)Adam Štipák
 
Marketing Digital - parte 3
Marketing Digital - parte 3Marketing Digital - parte 3
Marketing Digital - parte 3Leandro Liberio
 
Add edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHPAdd edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHPVineet Kumar Saini
 
Country State City Dropdown in PHP
Country State City Dropdown in PHPCountry State City Dropdown in PHP
Country State City Dropdown in PHPVineet Kumar Saini
 
Isis Cybera Summit 2009
Isis Cybera Summit 2009Isis Cybera Summit 2009
Isis Cybera Summit 2009Cybera Inc.
 
AKA BRANDBOOK 2016 NEW small
AKA BRANDBOOK 2016 NEW smallAKA BRANDBOOK 2016 NEW small
AKA BRANDBOOK 2016 NEW smallRob Jones FCCA
 
Document
DocumentDocument
Documentviwviw
 
News of the Symfony2 World
News of the Symfony2 WorldNews of the Symfony2 World
News of the Symfony2 WorldFabien Potencier
 
Story bird resource_part_1
Story bird resource_part_1Story bird resource_part_1
Story bird resource_part_1Eric Brace
 
A re introduction to webpack - reactfoo - mumbai
A re introduction to webpack - reactfoo - mumbaiA re introduction to webpack - reactfoo - mumbai
A re introduction to webpack - reactfoo - mumbaiPraveen Puglia
 
Introduction to ZendX jQuery
Introduction to ZendX jQueryIntroduction to ZendX jQuery
Introduction to ZendX jQuerydennisdc
 
Twitter bootstrap
Twitter bootstrapTwitter bootstrap
Twitter bootstrapdennisdc
 
WordPress-Powered Portfolios
WordPress-Powered PortfoliosWordPress-Powered Portfolios
WordPress-Powered PortfoliosTyler Sticka
 
The smiley dictionary
The smiley dictionaryThe smiley dictionary
The smiley dictionaryadindayeti
 
Exemple de création de base
Exemple de création de baseExemple de création de base
Exemple de création de baseSaber LAJILI
 

Was ist angesagt? (20)

Storybird resource part_2
Storybird resource part_2Storybird resource part_2
Storybird resource part_2
 
[ HackFest.pl 2012] Testing - what for and how
[ HackFest.pl 2012] Testing - what for and how[ HackFest.pl 2012] Testing - what for and how
[ HackFest.pl 2012] Testing - what for and how
 
Nette framework (WebElement #27 lightning talk)
Nette framework (WebElement #27 lightning talk)Nette framework (WebElement #27 lightning talk)
Nette framework (WebElement #27 lightning talk)
 
Marketing Digital - parte 3
Marketing Digital - parte 3Marketing Digital - parte 3
Marketing Digital - parte 3
 
Add edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHPAdd edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHP
 
Pagination in PHP
Pagination in PHPPagination in PHP
Pagination in PHP
 
Country State City Dropdown in PHP
Country State City Dropdown in PHPCountry State City Dropdown in PHP
Country State City Dropdown in PHP
 
Isis Cybera Summit 2009
Isis Cybera Summit 2009Isis Cybera Summit 2009
Isis Cybera Summit 2009
 
AKA BRANDBOOK 2016 NEW small
AKA BRANDBOOK 2016 NEW smallAKA BRANDBOOK 2016 NEW small
AKA BRANDBOOK 2016 NEW small
 
Document
DocumentDocument
Document
 
News of the Symfony2 World
News of the Symfony2 WorldNews of the Symfony2 World
News of the Symfony2 World
 
Story bird resource_part_1
Story bird resource_part_1Story bird resource_part_1
Story bird resource_part_1
 
A re introduction to webpack - reactfoo - mumbai
A re introduction to webpack - reactfoo - mumbaiA re introduction to webpack - reactfoo - mumbai
A re introduction to webpack - reactfoo - mumbai
 
wget.pl
wget.plwget.pl
wget.pl
 
Introduction to ZendX jQuery
Introduction to ZendX jQueryIntroduction to ZendX jQuery
Introduction to ZendX jQuery
 
Twitter bootstrap
Twitter bootstrapTwitter bootstrap
Twitter bootstrap
 
WordPress-Powered Portfolios
WordPress-Powered PortfoliosWordPress-Powered Portfolios
WordPress-Powered Portfolios
 
The smiley dictionary
The smiley dictionaryThe smiley dictionary
The smiley dictionary
 
Exemple de création de base
Exemple de création de baseExemple de création de base
Exemple de création de base
 
Facebook
FacebookFacebook
Facebook
 

Andere mochten auch

Reunió pares llar novembre 2013
Reunió pares llar novembre 2013Reunió pares llar novembre 2013
Reunió pares llar novembre 2013mediasinguerlin
 
You Can't Miss What You Can't Measure
You Can't Miss What You Can't MeasureYou Can't Miss What You Can't Measure
You Can't Miss What You Can't MeasureKerri Miller
 
Reunió pares llar juny ok
Reunió pares llar  juny okReunió pares llar  juny ok
Reunió pares llar juny okmediasinguerlin
 
Big data analytics and its impact on internet users
Big data analytics and its impact on internet usersBig data analytics and its impact on internet users
Big data analytics and its impact on internet usersStruggler Ever
 
Intel modun3 bakhtran
Intel modun3 bakhtranIntel modun3 bakhtran
Intel modun3 bakhtranBakh Tran
 
Reunió Inici de Curs P-4
Reunió Inici de Curs P-4Reunió Inici de Curs P-4
Reunió Inici de Curs P-4mediasinguerlin
 
Как я зимовала 2015
Как я зимовала 2015Как я зимовала 2015
Как я зимовала 2015Anna Stetsenko
 
An online flea market in higher education using c2 c e commerce model a requi...
An online flea market in higher education using c2 c e commerce model a requi...An online flea market in higher education using c2 c e commerce model a requi...
An online flea market in higher education using c2 c e commerce model a requi...Struggler Ever
 
Bo cau hoi dinh huong su no vi nhiet cua vat ran
Bo cau hoi dinh huong su no vi nhiet cua vat ranBo cau hoi dinh huong su no vi nhiet cua vat ran
Bo cau hoi dinh huong su no vi nhiet cua vat ranBakh Tran
 
Indigo: Как в Украине найти сейла на миллион
Indigo: Как в Украине найти сейла на миллионIndigo: Как в Украине найти сейла на миллион
Indigo: Как в Украине найти сейла на миллионAnna Stetsenko
 
Девушки пишут первыми только в Linkedin ver 3.1
Девушки пишут первыми только в Linkedin ver 3.1Девушки пишут первыми только в Linkedin ver 3.1
Девушки пишут первыми только в Linkedin ver 3.1Anna Stetsenko
 
Indigo: Afterparty Recruiting для Найти Ответ №10
Indigo: Afterparty Recruiting для Найти Ответ №10 Indigo: Afterparty Recruiting для Найти Ответ №10
Indigo: Afterparty Recruiting для Найти Ответ №10 Anna Stetsenko
 

Andere mochten auch (17)

SCF NE Group Orientation 2011 ppt Sierra Club Florida
SCF NE Group Orientation 2011 ppt Sierra Club FloridaSCF NE Group Orientation 2011 ppt Sierra Club Florida
SCF NE Group Orientation 2011 ppt Sierra Club Florida
 
Experiencia olivieri
Experiencia olivieriExperiencia olivieri
Experiencia olivieri
 
Reunió pares llar novembre 2013
Reunió pares llar novembre 2013Reunió pares llar novembre 2013
Reunió pares llar novembre 2013
 
Portaventura
PortaventuraPortaventura
Portaventura
 
You Can't Miss What You Can't Measure
You Can't Miss What You Can't MeasureYou Can't Miss What You Can't Measure
You Can't Miss What You Can't Measure
 
Reunió pares llar juny ok
Reunió pares llar  juny okReunió pares llar  juny ok
Reunió pares llar juny ok
 
Google 0
Google 0Google 0
Google 0
 
Big data analytics and its impact on internet users
Big data analytics and its impact on internet usersBig data analytics and its impact on internet users
Big data analytics and its impact on internet users
 
Intel modun3 bakhtran
Intel modun3 bakhtranIntel modun3 bakhtran
Intel modun3 bakhtran
 
Laboratory practice
Laboratory practiceLaboratory practice
Laboratory practice
 
Reunió Inici de Curs P-4
Reunió Inici de Curs P-4Reunió Inici de Curs P-4
Reunió Inici de Curs P-4
 
Как я зимовала 2015
Как я зимовала 2015Как я зимовала 2015
Как я зимовала 2015
 
An online flea market in higher education using c2 c e commerce model a requi...
An online flea market in higher education using c2 c e commerce model a requi...An online flea market in higher education using c2 c e commerce model a requi...
An online flea market in higher education using c2 c e commerce model a requi...
 
Bo cau hoi dinh huong su no vi nhiet cua vat ran
Bo cau hoi dinh huong su no vi nhiet cua vat ranBo cau hoi dinh huong su no vi nhiet cua vat ran
Bo cau hoi dinh huong su no vi nhiet cua vat ran
 
Indigo: Как в Украине найти сейла на миллион
Indigo: Как в Украине найти сейла на миллионIndigo: Как в Украине найти сейла на миллион
Indigo: Как в Украине найти сейла на миллион
 
Девушки пишут первыми только в Linkedin ver 3.1
Девушки пишут первыми только в Linkedin ver 3.1Девушки пишут первыми только в Linkedin ver 3.1
Девушки пишут первыми только в Linkedin ver 3.1
 
Indigo: Afterparty Recruiting для Найти Ответ №10
Indigo: Afterparty Recruiting для Найти Ответ №10 Indigo: Afterparty Recruiting для Найти Ответ №10
Indigo: Afterparty Recruiting для Найти Ответ №10
 

Ähnlich wie Eden twitter

Unit 3 - for php application Sessions.pptx
Unit 3  -  for php  application Sessions.pptxUnit 3  -  for php  application Sessions.pptx
Unit 3 - for php application Sessions.pptxmythili213835
 
Unit and Functional Testing with Symfony2
Unit and Functional Testing with Symfony2Unit and Functional Testing with Symfony2
Unit and Functional Testing with Symfony2Fabien Potencier
 
Building secured wordpress themes and plugins
Building secured wordpress themes and pluginsBuilding secured wordpress themes and plugins
Building secured wordpress themes and pluginsTikaram Bhandari
 
Perl调用微博API实现自动查询应答
Perl调用微博API实现自动查询应答Perl调用微博API实现自动查询应答
Perl调用微博API实现自动查询应答琛琳 饶
 
Saferpay Checkout Page - PHP Sample (Hosting)
Saferpay Checkout Page - PHP Sample (Hosting)Saferpay Checkout Page - PHP Sample (Hosting)
Saferpay Checkout Page - PHP Sample (Hosting)webhostingguy
 
Using shortcode in plugin development
Using shortcode in plugin developmentUsing shortcode in plugin development
Using shortcode in plugin developmentgskhanal
 
You're Doing it Wrong - WordCamp Orlando
You're Doing it Wrong - WordCamp OrlandoYou're Doing it Wrong - WordCamp Orlando
You're Doing it Wrong - WordCamp OrlandoChris Scott
 
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)Dotan Dimet
 
Eden Hackathon Benilde (Mysql & SMTP)
Eden Hackathon Benilde (Mysql & SMTP)Eden Hackathon Benilde (Mysql & SMTP)
Eden Hackathon Benilde (Mysql & SMTP)Dan Michael Molina
 
Building Persona: federated and privacy-sensitive identity for the Web (Open ...
Building Persona: federated and privacy-sensitive identity for the Web (Open ...Building Persona: federated and privacy-sensitive identity for the Web (Open ...
Building Persona: federated and privacy-sensitive identity for the Web (Open ...Francois Marier
 
Introducing CakeEntity
Introducing CakeEntityIntroducing CakeEntity
Introducing CakeEntityBasuke Suzuki
 

Ähnlich wie Eden twitter (20)

logic321
logic321logic321
logic321
 
CakePHP workshop
CakePHP workshopCakePHP workshop
CakePHP workshop
 
Zero to SOLID
Zero to SOLIDZero to SOLID
Zero to SOLID
 
Separation of concerns - DPC12
Separation of concerns - DPC12Separation of concerns - DPC12
Separation of concerns - DPC12
 
Unit 3 - for php application Sessions.pptx
Unit 3  -  for php  application Sessions.pptxUnit 3  -  for php  application Sessions.pptx
Unit 3 - for php application Sessions.pptx
 
Unit and Functional Testing with Symfony2
Unit and Functional Testing with Symfony2Unit and Functional Testing with Symfony2
Unit and Functional Testing with Symfony2
 
Building secured wordpress themes and plugins
Building secured wordpress themes and pluginsBuilding secured wordpress themes and plugins
Building secured wordpress themes and plugins
 
QA for PHP projects
QA for PHP projectsQA for PHP projects
QA for PHP projects
 
Symfony2. Form and Validation
Symfony2. Form and ValidationSymfony2. Form and Validation
Symfony2. Form and Validation
 
Perl调用微博API实现自动查询应答
Perl调用微博API实现自动查询应答Perl调用微博API实现自动查询应答
Perl调用微博API实现自动查询应答
 
Saferpay Checkout Page - PHP Sample (Hosting)
Saferpay Checkout Page - PHP Sample (Hosting)Saferpay Checkout Page - PHP Sample (Hosting)
Saferpay Checkout Page - PHP Sample (Hosting)
 
Using shortcode in plugin development
Using shortcode in plugin developmentUsing shortcode in plugin development
Using shortcode in plugin development
 
You're Doing it Wrong - WordCamp Orlando
You're Doing it Wrong - WordCamp OrlandoYou're Doing it Wrong - WordCamp Orlando
You're Doing it Wrong - WordCamp Orlando
 
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)
 
Add loop shortcode
Add loop shortcodeAdd loop shortcode
Add loop shortcode
 
Daily notes
Daily notesDaily notes
Daily notes
 
Eden Hackathon Benilde (Mysql & SMTP)
Eden Hackathon Benilde (Mysql & SMTP)Eden Hackathon Benilde (Mysql & SMTP)
Eden Hackathon Benilde (Mysql & SMTP)
 
Building Persona: federated and privacy-sensitive identity for the Web (Open ...
Building Persona: federated and privacy-sensitive identity for the Web (Open ...Building Persona: federated and privacy-sensitive identity for the Web (Open ...
Building Persona: federated and privacy-sensitive identity for the Web (Open ...
 
Introducing CakeEntity
Introducing CakeEntityIntroducing CakeEntity
Introducing CakeEntity
 
Php
PhpPhp
Php
 

Eden twitter

  • 1. Eden Twitter Go to http://dev.twitter.com AND http://eden.openovate.com/download
  • 2. Eden Twitter //include eden Include ‘eden.php’; //twitter credentials $key = ‘[some random characters]’; $secret = ‘[some random character]’;
  • 3. Instantiate Twitter Auth //twitter auth $auth = eden(‘twitter’)->auth($key, $secret);
  • 4. Get Request Token //getting request token //for authentication $token = $auth->getRequestToken(); //login url $url = $auth->getLoginUrl( $token[‘oauth_token’]);
  • 5. Twitter Access Token //getting access token $access = $auth->getAccessToken($_GET[‘oauth_token’], $token[‘oauth_token_secret’], $_GET[‘oauth_verfier’] );
  • 6. Twitter Get User Info //instantiate twitter user $user = eden(‘twitter’)->users($key, $secret, $access[‘oauth_token’], $access[‘oauth_token_secret’]);
  • 7. Get User Info //get info of authenticated user $info = $user->getCredentials()
  • 8. Post a tweet //Instantiate tweet $tweet = eden(‘twitter’)->tweet($key, $secret, $access[‘oauth_token’], $access[‘oauth_token_secret’]);
  • 9. Post a Tweet //send tweet $tweet->tweet(‘[YOUR TWEET]’);
  • 10. Post a Tweet with Image //image syntax $img = “@{$_FILES[‘image’][‘tmp_name’]};”. “type={$_FILES[‘image’][‘type’]};”. “filename{$_FILES[‘images’][‘name’]}”;
  • 11. Post a Tweet with Image //send tweet with image $tweets->tweetMedia([YOUR-STATUS], $img);
  • 14. Instantiate Paypal Check Out $paypal = eden()->Eden_Paypal() ->checkout(‘[user-email]’, ‘[password]’, ‘[signature]’, ‘[certificate file path]’, boolean);
  • 15. Eden Paypal Checkout //Prepare checkout data $checkout = $paypal->setAmount(‘[amount]’) ->setItemAmount(‘[amount]’) ->setCurrency(‘[amount]’) ->setItemName(‘[Item Name]’) ->setItemDescription(‘[Item Description]’) ->setQuantity(‘[quantity]’);
  • 16. Eden Paypal Checkout //Prepare checkout data $checkout = $paypal->setAmount(100) ->setItemAmount(100) ->setCurrency(‘PHP’) ->setItemName(‘Nike Shoe’) ->setItemDescription(‘Amazing nike shoe’) ->setQuantity(1);
  • 17. Eden Paypal Get Token //get response $response = $checkout ->getResponse(‘[success url]’, ‘cancel url’);
  • 18. Eden Paypal Get Token //get response $response = $checkout ->getResponse(‘http://clark.com?success’, ‘http://clark.com?cancel’);
  • 19. Eden Paypal getResponse //getResponse returns Array(‘[TOKEN ]’ => ‘[Some Random character]’, ‘[timestamp]’ => ‘date’, ‘[CORELATIONID]’ => ‘[some random character]’, ‘[ACK]’ => [Success or Failure] …);
  • 20. Eden Paypal Redirect to paypal //this will redirect to paypal $checkout->setToken([token], true);
  • 21. Get information of payment //getting payment information $info = $checkout->setToken([token]) ->setAmount(‘[amount]’) ->setCurrency(‘[currency]’) ->getTransactionId(‘[PayerID]’);
  • 22. Use Eden on all of My Projects OR Code From Scratch?