redirect to FB authorization dialog if user has not authorized yet?
Is there a way to make my Drupal for Facebook canvas app automatically redirect users that have not authorized my app to the authorization dialog immediately, instead of requiring them to click a "connect" button? This is the way most Facebook apps work that I've seen.
According to the Facebook app docs:
In order to gain access to all the user information available to your app by default (like the user's Facebook ID), the user must authorize your app. We recommend that you use the OAuth Dialog for Apps on Facebook.com. You invoke this dialog by redirecting the user's browser to the following URL (replacing the YOUR_APP_ID and YOUR_CANVAS_PAGE with the correct values found in the Developer App):
https://www.facebook.com/dialog/oauth?
client_id=YOUR_APP_ID&redirect_uri=YOUR_CANVAS_PAGEhttp://developers.facebook.com/docs/guides/canvas
I'm hoping to follow this recommendation.
Thanks.
- Forums:

fb_require_authorization()
I've added a function to fb.module to help with this. So, in your drupal menu callback, or a php snippet in say a block or node, add this...
fb_require_authorization();It should do what you want. Just requires a little custom coding to make it apply only to the pages you want it to apply to.
Does anyone have a solution for this?
I'm desperatly looking for it.
Please help!