I want to get current loggedin facebook user in php sdk. Here is what i have tried:
$facebook = new \\Facebook(array(
\'appId\' => \'XXXXXXXXXXX\',
Looks like you want to display the current user without him having approved your app to access his information.
This is not possible. Why?
Unless you already have an access token, you can't bypass the login step. Thus, you must use the getLoginUrl()
thing.