Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 905931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:18:11+00:00 2026-05-15T16:18:11+00:00

I am new to creating a facebook application and hence started out with a

  • 0

I am new to creating a facebook application and hence started out with a simple Hello World Application. But When I try to display my Name, it is not displayed.

This is my code:

 <?php
   require_once 'facebook.php';

   $api_key = 'mykey';
   $secret = 'mysecretkey';
   $facebook = new Facebook($api_key, $secret);
   $user = $facebook->require_login();

   $fbml      = "<h2>Hello world, my name is <fb:name uid='<?php echo $fb_user;?>'   useyou='false' />,"
       . "welcome to my first facebook application!</h2>";
   echo $fbml;
?>

The output in my facebook app is,

     Hello world,my name is,welcome to my first facebook application!

My name is missing here.

And If I add the code given below,to display the friend’s list,

 $friends = $facebook->api_client->friends_get();
 echo "<pre>Friends:" . print_r($friends, true). "</pre>";

I get the error message,

 Warning: fopen() [function.fopen]: php_network_getaddresses: getaddrinfo failed:
 No such host is known. 
 in C:\Documents and Settings\256148\My Documents\ide\xampplite\htdocs\facebookApp\facebookapi_php5_restlib.php on line 1755

 Warning: fopen(http://api.facebook.com/restserver.php) [function.fopen]:
 failed to open stream: php_network_getaddresses: getaddrinfo failed: 
 No such host is known. in C:\Documents and Settings\256148\My Documents\ide\xampplite\htdocs\facebookApp\facebookapi_php5_restlib.php on line 1755

Please guide me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T16:18:12+00:00Added an answer on May 15, 2026 at 4:18 pm

    I have found a solution for my problem. I had to set the connect url in the application setting to my canvas callback url and created a cross domain communication channel file as given in this tutorial. This tutorial is really very helpful and explains in detail about creating a simple facebook app.

    But still I get the Network error when I use $facebook->api_client->friends_get();

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Call me a 'n00b', but I am new to creating Script Controls. I want
Howdy. I've been tasked with making a Facebook game, but I'm new to Facebook
Java fb API I am creating facebook web application, to create even following is
I'm a new Facebook developer. I'm creating a game and want to include a
I am very new to creating webservers - and I have had several goes
I am new to creating Java web applications and came across this problem when
When creating a new file with vim, I would like to automatically add some
When creating a new build in Team Foundation Server, I get the following error
When creating a new C++ header/source file, what information do you add to the
When creating a new xml file, how does one go about structuring the file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.