Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-verify app permissions #2

Closed
mbaechtold opened this issue Mar 11, 2011 · 9 comments
Closed

Re-verify app permissions #2

mbaechtold opened this issue Mar 11, 2011 · 9 comments

Comments

@mbaechtold
Copy link

I've got a little up and running with fandjango where I asked the user to grant the "publish_stream" permission.

Now my question is, how can I check again if the user didn't remove the "publish_stream" permission later?

@jgorset
Copy link
Owner

jgorset commented Mar 11, 2011

Unfortunately, the signed request that Fandjango derives its data from does not contain any information on what extended permissions the user has given the application.

You can query the Facebook REST API's users.hasAppPermissions method to verify whether your application has been granted the publish_stream extended permission for a given user, however.

@mbaechtold
Copy link
Author

Thank you...
I know, this is not related to fandjango, but is it possible to do this via the Graph API?

@jgorset
Copy link
Owner

jgorset commented Mar 11, 2011

I regret to say that Facebook has not implemented an equivalent to users.hasAppPermissions in the Graph API yet, but it's likely that they will once the REST API becomes completely deprecated.

@mbaechtold
Copy link
Author

Ah ok, are you aware of good python implementation of the RESTFUL API?

@mbaechtold
Copy link
Author

@jgorset
Copy link
Owner

jgorset commented Mar 11, 2011

I try to avoid using the REST API, but I believe you're right; it is that simple.

@jgorset
Copy link
Owner

jgorset commented May 11, 2011

@Tini,

I thought you might be interested to know that Facebook have recently ported this method to their Graph API (see Platform Updates: Operation Developer Love).

I don't know how you'd go about querying this with Facebook's Python SDK, but here's how you might do it with Facepy:

from facepy import GraphAPI

graph = GraphAPI(oauth_access_token)

permissions = graph.get('me/permissions')[0]

if 'publish_stream' in permissions:
    print 'The user has granted the application permission to post on his/her wall'

@mbaechtold
Copy link
Author

Oh they finally have ported this? I'll have a look at it although I'm not going to update the project any time soon.
But I'll keep it in mind for future projects. Thx and keep up the good work.

@bulkan
Copy link

bulkan commented Dec 19, 2011

If the user has removed 'publish_stream' is there a way to ask for it again ?

EDIT: you just redirect to the auth panel

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants