Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added yap example

  • Loading branch information...
commit d12724ca3972156a227ed5f402c8f469da08616a 1 parent 29d355d
Dustin Whittle dustinwhittle authored

Showing 1 changed file with 68 additions and 0 deletions. Show diff stats Hide diff stats

  1. +68 0 examples/yap/profiles.php
68 examples/yap/profiles.php
... ... @@ -0,0 +1,68 @@
  1 +<?php
  2 +
  3 +/**
  4 + * Yahoo! PHP5 SDK
  5 + *
  6 + * * Yahoo! Query Language
  7 + * * Yahoo! Social API
  8 + *
  9 + * Find documentation and support on Yahoo! Developer Network: http://developer.yahoo.com
  10 + *
  11 + * Hosted on GitHub: http://github.com/yahoo/yos-social-php5/tree/master
  12 + *
  13 + * @package yos-social-php5
  14 + * @subpackage yahoo
  15 + *
  16 + * @author Dustin Whittle <dustin@yahoo-inc.com>
  17 + * @copyright Copyrights for code authored by Yahoo! Inc. is licensed under the following terms:
  18 + * @license BSD Open Source License
  19 + *
  20 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  21 + * of this software and associated documentation files (the "Software"), to deal
  22 + * in the Software without restriction, including without limitation the rights
  23 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  24 + * copies of the Software, and to permit persons to whom the Software is
  25 + * furnished to do so, subject to the following conditions:
  26 + *
  27 + * The above copyright notice and this permission notice shall be included in
  28 + * all copies or substantial portions of the Software.
  29 + *
  30 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  31 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  32 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  33 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  34 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  35 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  36 + * THE SOFTWARE.
  37 + **/
  38 +
  39 +require_once(dirname(__FILE__).'/common.inc.php');
  40 +try {
  41 + $oauthapp = YahooOAuthApplication::fromYAP(OAUTH_CONSUMER_KEY, OAUTH_CONSUMER_SECRET, OAUTH_APP_ID);
  42 +}
  43 +catch (YahooOAuthApplicationException $e) {
  44 +
  45 +}
  46 +?>
  47 +
  48 +<style type="text/css">
  49 +div#ydoc {
  50 + display: block;
  51 + font-size: 100%;
  52 + font-family: "Calibri", "Lucida Grande", "Tahoma", Arial;
  53 + text-align: left;
  54 + vertical-align: middle;
  55 + color: #000;
  56 + background-color: #fff;
  57 + margin: 0;
  58 + padding: 0;
  59 +}
  60 +</style>
  61 +
  62 +<div id="ydoc" class="yui-skin-sam">
  63 +<?php if(isset($oauthapp) && ($oauthapp instanceof YahooOAuthApplication)): ?>
  64 +
  65 + <pre><?php var_dump($oauthapp->getProfile()); ?></pre>
  66 +
  67 +<?php endif; ?>
  68 +</div>

0 comments on commit d12724c

Please sign in to comment.
Something went wrong with that request. Please try again.