Now, is more than 60 different permission in Facebook (link).

Unfortunately, i need some of new permissions (which aren't in fb module).

If anybody agrees, i'm going to create patch. I'll post it as soon as possible.

CommentFileSizeAuthor
#4 fb-867242-4.patch23.4 KBAnclywen

Comments

Dave Cohen’s picture

I'm not sure what's best, trying to keep up with everything facebook adds, or adding some option to manually type the names of the permissions.

Anclywen’s picture

if facebook changes it's mind as often as i think it does, manually typed names is great idea.

On the second thought, list of declared permissions is very practical, because you don't have to use facebook's permissions site all the time, to check only name of needed permission.

Maybe we should use both solutions:
a) Manually typed names of permissions - so we don't have to trying keep up with fb all the time (only from time to time :) )
b) List of permissions (on date xx/xx/xxxx)

Dave Cohen’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev
Category: task » feature

Changing to 3.x, since this change is unlikely to make it into 2.x

Right now if you're willing to implement a hook in your own module, you can do something like this...

/**
 * Implements hook_fb_required_perms_alter().
 *
 *  developers.facebook.com/docs/authentication/permissions
 */
function takepart_fb_feature_fb_required_perms_alter(&$perms) {
  // Require the mail and birthday extended permissions.
  $perms[] = 'email';
  $perms[] = 'user_birthday';
  
}
Anclywen’s picture

Status: Active » Needs review
StatusFileSize
new23.4 KB

Changes:
1. Updated list of Facebook Permissions (more than 60 permissions)
2. Changed method of display permissions from regular form to analogous to permissions' table (for the sake of usability)
3. Moved permission list to new file and applying some CSS :)
4. (incidentally) Get rid of PHP warning in #865614: Invalid argument supplied for foreach() in /var/www/beta/sites/all/modules/fb/contrib/fb_permission.module on line 56.

For adding new permissions, imho using the hook_fb_required_perms_alter() is the most "clean" solution

Please, review and give feedback

gateway69’s picture

Do you have this set up to save any extended permissions the users auths saved to the profile? For example home town is a permission.. Guess we could extend the profile with various fields and populate them when permissions are granted since now you can store fb data on your one server

Anclywen’s picture

Not quite understand what you mean.

If you are proposing the creation of the fields that will store user data, I am afraid that this is against the Facebook terms of service (FB TOS - section 9.3), and here is the opinion of Dave Cohen about this subject #709468-1: RealName integration. You can only cache user data to improve your application’s user experience.

escore’s picture

As gateway69 said, Facebook no longer prohibits the storage of user data as long as the user consents and you're clear about how you use that data. At least that's how I understand the current terms. Perhaps FB changes the terms as often as they change their other stuff (btw, section 9.3 now reads "You will not give us information that you independently collect from a user or a user's content without that user's consent."). The change in terms could open up for new features in other parts of DFF as well, not just fb_permissions.

Anclywen’s picture

This changes the situation.
Sorry, it seems that I have read the FB policies again, and this very carefully:)
At first glance, everything is based on the own privacy policy page

However, I propose to open a new issue about this subject (and leave this issue to determine whether the patch is suitable or not)

Dave Cohen’s picture

Thanks Anclywen for the patch. I will review when I have a moment.

I agree that the idea of saving data from facebook into drupal user profile (or better, syncing the data) should be discussed in another issue.

gateway69’s picture

Thanks for the patch, I did it another way but ill use yours instead :) btw I did create a separate issue/request for the profile fields..

http://drupal.org/node/878282

gateway69’s picture

I had to reinstall with the latest fb build, the patch seems to go kaboom :(

ST

Anclywen’s picture

Status: Needs review » Needs work
ckng’s picture

function fb_permission_list_all_permissions()

Instead of maintaining the label and description manually, it may be easier to use permissions_info to retrieve those information. So we only need to keep track of permission names.

Dave Cohen’s picture

I'm not sure what you mean. What's permissions_info?

ckng’s picture

This http://developers.facebook.com/docs/reference/fql/permissions_info, if not maintaining the list will be a headache

Dave Cohen’s picture

Thanks, I agree it should use that table. Ideally it would learn which permissions are available via FQL, but I don't see any way to query that.

Dave Cohen’s picture

Status: Needs work » Fixed

Checked in a change. Next release will query the entire list of permissions.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.