Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook API Authentication

if I want to authenticate a user through facebook is it necessary to 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.
- lony

like image 701
lony Avatar asked May 26 '26 00:05

lony


2 Answers

The 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

like image 112
Sumit Ghosh Avatar answered May 28 '26 18:05

Sumit Ghosh


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.

like image 36
Macy Abbey Avatar answered May 28 '26 18:05

Macy Abbey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!