Facebook“签名请求”使用纯经典 ASP
我想在我的 Facebook 应用程序中获取 signed_request
的内容,但仅使用带有 VBScript 的经典 ASP。
Facebook 的网站有一个 PHP 解码示例,但我找不到 ASP 的任何内容。
我想我需要解码 base64url,然后读取 JSON,但我不知道如何。
I would like to get the contents of the signed_request
in my fb app, but using only Classic ASP with VBScript.
Facebook's site has an example in PHP of decoding this but I can't find anything for ASP.
I think I need to decode the base64url, then read the JSON, but I don't know how.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我和你在同一条船上。所有提供创建门的代码的站点都是用 PHP 编写的。使用 ChiliPepperDesign 的 “Reveal / Fan-Gate / Like-Gate Facebook iFrame Tab” 作为起点,我将 PHP 转换为 ASP/VBScript,并找到了base64 解码和 JSON 解码(显然 PHP 本身就是这样做的)。
我从 GitHub 获取的 JSON.decode 脚本。是的,它是 Javascript,但是如果您在页面上的代码前面加上以下内容,则可以在 ASP/VBScript 站点上运行它:
将所有下载的 Javascript 放入,然后使用通常的
关闭。
标签。将此文件另存为 json_decode.asp。Base64 解码有点困难(我最初下载的那个可以工作,但不能工作)。我在免费 VBCode 上找到了更好的版本。下载该文件并将其放入另一个文件base64_encode-decode.asp中。
最后,将所有内容组合在一起的代码是:
将其另存为 facebook-likeGate.asp ,在您的网站上与两个包含文件相同的位置,并将 Facebook 指向此页面。
华泰
JF
I was in the same boat you are. All of the sites which provide code to create a gate are written in PHP. Using the code on ChiliPepperDesign's "Reveal / Fan-Gate / Like-Gate Facebook iFrame Tab" as a starting point, I converted the PHP to ASP/VBScript, and found sources for the base64 decode and JSON decode (which PHP apparently does natively).
The JSON.decode script I got from GitHub. Yes, it is Javascript, but you can run it on an ASP/VBScript site if you preface the code on the page with this:
Put all of the downloaded Javascript in, and then close with the usual
</script>
tag. Save this file as json_decode.asp.The base64 decode was a little harder (the one I initially downloaded sorta worked and sorta did NOT work). I found a better version on Free VBCode. Downlaod that and put it into another file, base64_encode-decode.asp.
Finally, the code to bring it all together is:
Save this as facebook-likeGate.asp on your site in the same location as the two include files, and point Facebook to this page.
HTH
JF
这是未使用 json_decode.asp 的代码
Here is the code without the use of json_decode.asp
您可以使用新的 JS SDK。这是我编码和使用的示例。帖子方法效果很好。
You can use new JS SDK. Here is a sample which I have coded and used. Post method works good.