Search Results

Getting Profile Information

This example uses YQL to get a user’s profile information, including their guid, gender, given name, image and location.

YQL table: social.profile

Setting Up this Example

  1. Start by going to the My Apps page and Click “Create New App”.

Note: If you are not already logged in to Yahoo!, you will be prompted to log in or create a new Yahoo! account.

The Create New App page appears.

Create Profile App
  1. Fill in the fields as follows:

    • App Title: Enter “Profile App”.

      This is the title of the App as it will appear in the Galleries.

    • App Content: Select “External”.

    • App Content URL: Enter the hosted URL “http://www.yap-apps.com/sample/userinfo.php

    • User Signin: Select “Required”.

    • HTTP Method: Select “GET”.

    • Dimensions: Enter “960” for Width, and “600” for Height. This is the default.

    • Description: Enter “Get Profile Information”

      This is the description of your app Gallery as it will appear to users.

  2. Click the “Create App” button. The Edit App page appears.

  3. Click Save.

  4. Click Preview.

The Preview page appears:

Preview Profile App

Hosted PHP file

$lang = isset($_REQUEST['lang']) ? $_REQUEST['lang'] : '';
$ctry = isset($_REQUEST['country']) ? $_REQUEST['country'] : '';
if($lang != '' && $ctry != '') {
	$str = "Your selected language code is <span>$lang</span> and Country code is <span>$ctry</span>";
}else {
	$str = 'We are not able to retrieve your information';
       h1 span{
      <?php echo $str;?>

Table of Contents