Reputation: 2099
I have the following code. I'm not getting any errors and my name won't display, even though I authorised the application. I should probably say, that my host doesn't support curl, so I used the api that doesn't need curl (https://github.com/mattmecham/php-sdk)
<?php
require 'src/facebook.php';
$facebook = new Facebook(array(
'appId' => 'my app id here',
'secret' => 'the code that should be here...',
'cookie' => true,
));
$me = $facebook->api('/the thing that follows after facebook.com/ to get to my profile');
echo $me['name']
?>
Do you know where the problem might be? Please let me know if you need any additional info...
Upvotes: 0
Views: 302
Reputation: 1679
As far as I see browsing the source code, this api requires curl https://github.com/mattmecham/php-sdk/blob/master/src/facebook.php
Upvotes: 0
Reputation: 2575
Everything seems right with your connection/instantiation info. Perhaps your api call is incorrect. You should be able to use $me = $facebook->api('/me');
to get your info. Try that and see if you get a response.
Upvotes: 0