Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
While this might be not necessary for everyone, it would be nice to have this option in the GUI as well.
It is important for Facebook Autopost integration as asking for user permission on the fly when submitting a comment for example, surprised the user when he is not ready for that massage.
I found the approach of asking for this permission during the registration more robust.
While there are so many other extended permission in the GUI right now and many of them irrelevant or rarely used - this one is really needed. it would be nice to have!
BR
Itzhak
Comments
Comment #1
nit3ch CreditAttribution: nit3ch commentedhi,
Can you tell me how to give my app permission to "Post on user behalf". Whenever user try to connect to through fb acconnt , the permission to "Post on user behalf" is missing. i being the creator of the app able to post on fb but other user who are connect their fb account are not able to post.
Thanks in advance. :)
Comment #2
hyperlinked CreditAttribution: hyperlinked commentedI agree that this is something that would be very desirable to have in place, but I can understand why it was left out as Facebook's best practices say to not ask for permission to post on their behalf until right before they're about to post something.
It's actually pretty easy to modify the FB Connect buttons using hook_fboauth_actions() so that your authentication request is initiated with additional scopes.
You can add the following code to a custom module to extend the regular connect action to include additional scopes:
Then in the theme function where the buttons are rendered you look for this:
Replace it with a call to your extended version of the original connect action.
Comment #3
AlexKirienko CreditAttribution: AlexKirienko at WikiJob commentedAsking permissions when you need it is a good practice. But didn't tests how it works yet. @hyperlinked thank you for example, I will try it.
I think this is one of core new practice in v2.x Graph API. It need to be described in readme and help pages.
Comment #4
jamesdixon CreditAttribution: jamesdixon commentedThe @hyperlinked method worked for me, but I changed the code to the following:
Otherwise the permissions in:
array_keys(fboauth_user_connect_permissions())
get overwritten.
Also a heads up you'll run into this issue unless Facebook reviews your app and approves the publish_pages and publish_actions permissions:
http://www.scriptscoop2.com/t/528cd23d0127/facebook-how-to-post-to-my-ow...