开发者

can't find post-authorize URL on facebook APP page

开发者 https://www.devze.com 2023-04-13 06:39 出处:网络
I am making a Facebook App which will be only used开发者_如何学Python for Facebook Pages. I need to provide a post-authorize URL to make some action on Database when a user adds the app to their page.

I am making a Facebook App which will be only used开发者_如何学Python for Facebook Pages. I need to provide a post-authorize URL to make some action on Database when a user adds the app to their page. But i cannot find any place to enter the URL.

Someone can help me ?

EDIT: User will only Add App to their page from Application Profile Page on FB


There is no such thing as "post-authorize URL" for applications working as Page tab. You will never know identity of user who added your application on page via application profile page.

Adding application to page doesn't mean that owner of page authorized the app.

Signed request contain information about page and user interacting with page tab application so you may know if user is admin of the page, liked the page and some additional details, it will include personal details only if user authorized application which should be done as separate step.


The way I'd do it:

  1. List all the PAGE ID on which your user is admin:

    FQL: select page_id from page_admin where uid=me()

  2. When a page load your application, using the data contained in the signed_request POST parameter, look if the current page is a new page (just assign a boolean in the database to know if the page is already using the application or is new), and if the page is in fact using the app for the forst time, look if you have the admin in your database (remember? you have linked the PAGE ID and the ADMIN ID together in #1)

From there, you can do whatever you want: display a "application not yet authorized" instead of the normal app in order to wait for the user to pay you, etc...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号