0

Facebook C# sdk を使用して signed_request を読み、次の詳細があります

if (Request.Params["signed_request"] != null)
            {
                dynamic signedRequest = fb.ParseSignedRequest(ConfigHelper.FacebookAppSecret,
                                                              Request.Params["signed_request"]);   

Session["signedRequest"] = signedRequest.ToString();

                if (signedRequest.page != null)
                {
                    requestFromFanPage = true;
                    var lPid = signedRequest.page.id != null ? (string) signedRequest.page.id : "";
                    Session["lPid"] = lPid.ToString();
                    var lLiked = signedRequest.page.liked ?? "";
                    Session["lLiked"] = lLiked;
                    userLiked = lLiked;
                }   

                var userid = signedRequest.user_id ?? "";    
                Session["lUserId"] =  userid;    
            }

Facebook IDなしで次の結果が得られます:(

{"algorithm":"HMAC-SHA256","issued_at":1370416053,"page":{"id":"490007204401534","liked":true,"admin":false},"user":{"country":"au","locale":"en_US","age":{"min":21}}}

facebookuserid が必要です。許可を得ずに取得する方法はありますか?

4

0 に答える 0