Hey everybody. I'm trying to make a simple facebook app, built off of the sample code provided by the facebook team. I'm trying to display an image that will also link back to my website. I think that I've got the code right (I've got no errors when viewing my app page), but nothing is showing up. Any ideas?

Thanks for the suggestions / help!

--B

require_once 'facebook.php';

$appapikey = '5e9e4cc39acac1abf8cbf8ae6385b546';
$appsecret = 'd1ac54466ddecfffa9302833dccbc753';
$facebook = new Facebook($appapikey, $appsecret);
$user_id = $facebook->require_login();

// Greet the currently logged-in user!
echo "<p>Hello, <fb:name uid=\"$user_id\" useyou=\"false\" />!</p>";

// Show the badge for Brady Awareness
// with a link to Ready Set Brady

echo "<a href=\"http://readysetbrady.com\"><img scr=\"http://photos-g.ll.facebook.com/photos-ll-snc1/v2246/71/105/24501530/n24501530_32939846_3677.jpg\"></a>";

echo "</p>";

    in your image's link you've got
    scr instead of src

      a month later
      9 months later

      From what I've discovered poking around with the FB API, it looks like you are mixing up FBML code with the API code.

      Add this code:

      $user_details = $facebook->api_client->users_getInfo($user_id, 'uid, last_name, first_name');
      echo '<p>Hello, ' . $user_details[0]['first_name'] . ' ' . $user_details[0]['last_name'] . '!</p>';
      

      Their documentation is garbage.

        Write a Reply...