if I want to authenticate a user through facebook is it necessary to开发者_StackOverflow社区 get an 'offline_access' permission for my application.
It should be possible for the user to link his application profile to his facebook account. So if he is already logged in to facebook he didn't has to authenticate again in my application.
I'm using the PHP-SDK with Zend.
Thank you.
- lonyThe php-sdk facebook class has a method - getLoginUrl.
You can pass an array to it, change the array params based on what permissions you need.
getLoginUrl(array(
'req_perms' => 'publish_stream,offline_access'));
A detailed list of permissions can be found here -
http://developers.facebook.com/docs/reference/api/user
Generally you only need the offline_access permission if you intend to access that user's account when they are not using your application. For example, your application has some back-end process running which posts to their wall once a week.
精彩评论