Reputation: 1981
I'm sorry if this is a re-post but no matter what search terms I use I can't find what I am looking for.
First, I'm developing in PHP, but the graph api just uses url calls so that shouldn't matter. I would like to avoid using the REST api.
I have an application that requires publish_stream and offline_access. The app is pointless for a user to install if they deny these permissions. How do I make them required?
I know I can check to make sure if the user has the permissions later, but that is a hassle and I'm trying to avoid it. But if this isn't possible that is what I'll have to do.
Upvotes: 0
Views: 388
Reputation: 12721
You don't have to use the REST API to authenticate, but you do need to check if the use has authenticated or not.
https://developers.facebook.com/blog/post/534/
You can use the javascript SDK instead of the REST API to prompt for authentication. You can use javascript for almost everything, not URL redirects needed.
https://developers.facebook.com/docs/reference/javascript/
There was actually a recent Facebook blog post about how to check for permissions, which is also helpful.
https://developers.facebook.com/blog/post/576/
If the user isn't authenticated, then place them on a page that has a button to prompt for authorization. Once granted, then you can redirect to the real page.
Upvotes: 1