tags:

views:

65

answers:

1

Hi, I am trying to write a small application to learn about developing for Facebook and I was trying one basic command, to say (Welcome, user_name).

I used:

 Welcome, <fb:name uid='<?php echo $user; ?>' useyou='false' possessive='true' />!

but it did not work, do you know what should i use?

+1  A: 

Are you doing this through a canvas application or Facebook Connect?

In either case, it's probably one of two issues: Either (A) the Facebook object is being fired up with the wrong api key or secret, or (B) you haven't authorized the application, so there's no UUID coming through.

Calling this before that code of yours should fix both:

$facebook = new Facebook(YOUR_API_KEY,YOUR_SECRET_CODE);
$user = $facebook->require_login();
DoryEx

related questions