How do I go about combining examples from both
https://github.com/facebook/php-sdk/blob/master/examples/example.php and https://github.com/facebook/connect-js/blob/m
I just use the Facebook login button - https://developers.facebook.com/docs/reference/plugins/login/
Once the user has used that to login (if they weren't already) and grant access to your app (site), the PHP-SDK should have no trouble using the Facebook session and APIs.
I just tried this with the new version 3.0 PHP SDK and it is definitely not working. Found this on the developer blog
If you are using the JavaScript SDK for login in conjunction with the PHP SDK, you will want to wait for the JavaScript SDK upgrade (coming in 4 weeks). Version 3.0.0 of the PHP SDK won’t cooperate with the current JavaScript SDK due to the cookie format changing.
In other words, use the v2 PHP SDK until the JS SDK is updated.