Facebook fan page app pass string to app_data and retrieve

爱⌒轻易说出口 提交于 2019-12-03 21:52:22

You can set the app_data as:

https://www.facebook.com/{page_id}?sk=app_{app_id}&app_data={"key1":"value1","key2":"value2"}

You can pass multiple values into app_data and it will be returned in the signed_request to your actual page as (POST data).

What you should really do is get the signed_request on first page load from POST, and add it to the URL of your app as ...?signed_request={signed_request_string}. Every page should then pass this around in the URL so you can easily check the like and admin status from any sub-page. You don't need to use app_data for this. And in any case, the data will be lost after the any subsequent click / redirect in your app.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!