Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Eden twitter

579 views

Published on

  • Be the first to comment

  • Be the first to like this

Eden twitter

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

×