User Tag List

Results 1 to 4 of 4

Thread: Facebook PHP - Question

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export ModuleUnicode Add-on
    Pharanygitis's Avatar
    Join Date
    Aug 2006
    Location
    Germany
    Posts
    1,037
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Facebook PHP - Question

    I have a little problem with the Facebook API. I can not read the email address of the user. This seems to work with "permissions". Does anyone know how I can get the email address via PHP?
    I use the current example from the forum. [color:#CC0000]Here is the current source code:[/color]

    Code:
    <?php
    
    require_once 'facebook/facebook.php';
    
    $appapikey = 'APIKEY';
    $appsecret = 'SECRET';
    $facebook = new Facebook($appapikey, $appsecret);
    $facebook->require_frame();
    $user_id = $facebook->require_login("publish_stream");
     
    $user_details 	= $facebook->api_client->users_getInfo($user_id, 'name,pic_big,profile_url,sex,wall_count,
    locale,uid,pic_square_with_logo,first_name,
    last_name,current_location,locale,timezone,sex,religion,website,relationship_status,hometown_location,birthday,birthday_date,books,email');
    
    
    $user_name = 		$user_details[0]['name'];
    $user_pic = 		$user_details[0]['pic_big'];
    $user_url = 		$user_details[0]['profile_url'];
    $user_wall = 		$user_details[0]['wall_count'];
    $user_location =	$user_details[0]['locale'];
    $user_uid =		$user_details[0]['uid'];
    $user_square =		$user_details[0]['pic_square_with_logo'];
    $user_first =		$user_details[0]['first_name'];
    $user_last =		$user_details[0]['last_name'];
    $user_location =	$user_details[0]['current_location'];
    $user_locale =		$user_details[0]['locale'];
    $user_timezone =	$user_details[0]['timezone'];
    $user_sex =		$user_details[0]['sex'];
    $user_religion =		$user_details[0]['religion'];
    $user_website =		$user_details[0]['website'];
    $user_relationship= 	$user_details[0]['relationship_status'];
    $user_hometown=	$user_details[0]['hometown_location'];
    $user_birthday=		$user_details[0]['birthday'];
    $user_birthdayD=	$user_details[0]['birthday_date'];
    $user_books	=	$user_details[0]['books'];
    $user_email	=	$user_details[0]['email'];
    
    echo "Name: ".$user_name."<br>";
    echo "Pic: ".$user_pic."<br>";
    echo "Url: ".$user_url."<br>";
    echo "Wall: ".$user_wall."<br>";
    echo "Location: ".$user_location."<br>";
    echo "ID: ".$user_id."<br>";
    echo "UID: ".$user_uid."<br>";
    echo "SquarePic: ".$user_square."<br>";
    echo "Email: ".$user_email."<br>";
    
    
    ?>

  2. #2
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Facebook PHP - Question

    My guess is that the API only gets public info, and the user has made their email address friends-only. It might even be like that by default. Nothing you can do to your application to get around that.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export ModuleUnicode Add-on
    Pharanygitis's Avatar
    Join Date
    Aug 2006
    Location
    Germany
    Posts
    1,037
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Facebook PHP - Question

    @Dynasoft... I have read you can find out the email with sessions (PHP or Javascript)... how it works ? i don't know ..... thats my problem.. :-(

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Facebook PHP - Question

    I don't know about that...

Similar Threads

  1. [MARKETING] Pay Facebook Ad on Facebook mobile app
    By paobrasil in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 30th March 2013, 04:32 PM
  2. facebook
    By kraminator in forum SWF/Flash Export Module Version 2.0
    Replies: 2
    Last Post: 4th April 2012, 09:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •