0

All I want is to find at least one working solution for this simple thing.
I want to determine what facebook user making request to my FB canvas application. I also want the mechanism to take into account cases when user logs off or re-logs on.
I've really broken my head on that :(

Ways i've already tried:
1) Getting and parsing signed_request param while user's initial request to the application. Cons: the canvas main page is the only place to get it. I never know what user is doing next actions.
2) Using fbsr cookie. Cons: sometimes i get error when trying to exchange cookie's code to user's access token. I still cant reproduce it, it just occurs. Btw, does it work at your?
3) Handling every get/post request at client side and adding user's access token being retrieved by JS SDK to the request. Doesnt seem to be a good way.

Well, that's it. What im doing wrong? Will be thankfull a lot for any working solution.

4

1 回答 1

0

1) 在用户对应用程序的初始请求时获取和解析signed_request 参数。缺点:画布主页是获得它的唯一地方。我永远不知道用户接下来会做什么。

那么只需将解析后的签名请求放入会话中......</p>

这就是我通常做的事情——每次Facebook::getSignedRequest产生其他结果时null,我都会将其写入我的会话中(所以我不会错过它是否被更新,用户喜欢该页面)。

于 2012-07-03T17:03:34.623 回答