需要帮助实施Facebook信用 [英] need help implementing facebook credits

查看:126
本文介绍了需要帮助实施Facebook信用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了其他几篇关于开始实施Facebook信用的帖子,并且已经从github下载了示例代码: https://github.com/facebook/credits-api-sample



我所做的唯一变化示例代码是:




  • 在index.php中,我设置了应用程序ID。

  • callback.php,我设置了应用程序的秘密。



我已将所有这些文件上传到我的服务器:




  • index.php

  • callback.php

  • facebook.php

  • facebookapi_php5_restlib.php

  • xd_receiver.html

  • 资产文件夹



在Facebook应用程序编辑页面上:




  • 画布网址指向index.php。 / li>
  • 信用回调字段指向我的

    服务器上的callback.php文件。

  • 将自己添加为信用测试者。



我还没有注册我的公司。这是测试需要的吗?
我没有安全的画布网址。这是否需要?该应用程序处于沙箱模式。



当我运行测试应用程序时,我看到索引页面。当我点击用Facebook付款按钮时,弹出此错误:


处理您的付款时出现问题。抱歉,我们无法处理您的付款。您没有为此交易收取费用。请重试。


当我关闭对话框时,会出现一条消息:


交易失败!



从Facebook返回的错误消息:




当前查看器0(EntID:)不能看到由id支持的实体(类EntApplication)

有人可以请告诉我我做错了什么?

解决方案

我发现了什么问题:


  1. 为了使之正常工作,您需要填写公司注册。


  2. 完成之后(这并不明显),您需要从下拉列表中实际选择公司。您必须在基本设置部分中设置一个安全的画布网址(即 /example.com/app/index.htmlrel =nofollow> https://example.com/app/index.html


  3. 我不知道您是否必须将回调作为一个安全的网址,以便测试工作,但这是有道理的,这将是必需的。



希望这将帮助其他可能运行的人类似的问题。



现在我必须弄清楚如何使用Facebook-actionscript sdk来工作。


I've read a few of the other posts on getting started with implementing Facebook credits and I've downloaded the sample code from github: https://github.com/facebook/credits-api-sample.

The only changes I had made to the sample code are:

  • In index.php, I set the app ID.
  • In callback.php, I set the app secret.

I've uploaded all these files to my server:

  • index.php
  • callback.php
  • facebook.php
  • facebookapi_php5_restlib.php
  • xd_receiver.html
  • assets folder

On the Facebook app edit page:

  • The canvas url points to index.php.
  • The credits callback field points to the callback.php file on my
    server.
  • Added myself as a credits tester.

I have not registered my company. Is that required for testing? I do not have a secure canvas url. Is that required? The app is in sandbox mode.

When I run the test app, I see the index page. When I click on the "Pay with Facebook" button, this error pops up:

There was a problem processing your payment. Sorry, but we're having trouble processing your payment. You have not been charged for this transaction. Please try again.

When I close the dialog, there is a message:

Transaction failed!

Error message returned from Facebook:

The entity (class EntApplication) backed by id cannot be seen by the current viewer 0 (EntID: )

Can someone please tell me what I am doing wrong?

解决方案

I found out what the problems were:

  1. In order to get this to work, you need to have the company registration filled out.

  2. After that is done (and this was not obvious), you need to actually select the company from the drop down list. This is all done in the credits section.

  3. You must have a secure canvas url set in the basic settings section (i.e. https://example.com/app/index.html)

  4. I'm not sure if you have to have the callback as a secure url in order for the test to work, but it does make sense that this would be required.

  5. The test will not work in sandbox mode.

Hopefully this will help others that may run into similar problems.

Now I have to figure out how to get this to work using the facebook-actionscript sdk.

这篇关于需要帮助实施Facebook信用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆