2012-02-01 25 views
2

我們正在實施Facebook Credits的作爲Facebook上的虛擬貨幣的過程。獲取一個用戶的Facebook積分餘額

我們已申請並已列入白名單用於訪問Facebook Credits的平衡法,但是從小事文件我已經能夠找到(主要是論壇的帖子),它似乎並不奏效!

我使用以下網址獲得用戶的積分餘額:https://api.facebook.com/method/users.getStandardinfo?fields=credit_balance&format=json&uids=FB_USER_ID&access_token=DEVELOPMENT_APP_ACCESS_TOKEN

而且我收到以下錯誤回:

"error_code": 13, "error_msg": "The underlying FQL query made by this API call has encountered the following error: credit_balance is not a member of the user table.",

你能確認上述網址是否正確,如果在文檔搜索大約一個小時後,我沒有提到任何東西!

+2

您正在使用過時的方法。我不確定他們是否還在工作(貌似沒有)。 – Lix 2012-02-01 18:05:53

+0

我儘可能多地嘗試找到正確的方法,這在某種程度上是不可能的! – 2012-02-01 21:39:21

+0

可能沒有太多幫助 - 但這裏是一個處理這個問題的bug報告,或者至少是一個相關的問題 - https://developers.facebook.com/bugs/289678194414280。 – Lix 2012-02-01 22:02:51

回答

3

首先,REST API被棄用,你應該使用新的圖形API。請參閱:https://developers.facebook.com/docs/reference/rest/

We are in the process of deprecating the REST API. If you are building a new Facebook application, please use the Graph API. While there is still functionality that we have not ported over yet, the Graph API is the center of Facebook Platform moving forward and where all new features will be found.

同樣在https://developers.facebook.com/docs/reference/rest/users.getStandardinfo/沒有現場叫credit_balance

我還去了https://developers.facebook.com/docs/reference/fql/user/並沒有現場叫credit_balance有太多。

但我沒有去https://developers.facebook.com/docs/credits/和學分讀了。看起來他們已經取消了應用程序獲取該信息的能力,以代替他們Facebook的新信用對話框,而不需要應用程序需要知道用戶的信用餘額,因爲Facebook會將其顯示給應用程序的用戶他們的對話。

您可以瞭解如何按照這裏的指南新的對話框整合:https://developers.facebook.com/docs/credits/build/

我的信念是,太多boneheads濫用特權的知道用戶的信用等級,他們的優勢,因此這個「功能」去掉了。