2

我正在使用适用于 Android 的 Facebook Wishlist 应用程序。当我尝试将自定义对象添加到 Facebook 图表时,API 返回以下错误:

  {
     "error: {
      "type": "OAuthExeption",
      "message":"(#100)
     Application does not own
     230752723668296 action type"
      }
     }

我无法找到有关此特定错误的任何特定文档。是否有任何 Facebook 开发人员可以帮助我解释这一点。

我还应该提到,我已经有一个运行没有错误的应用程序的工作示例(我正在尝试复制它,以便我可以调整它而不必担心失去工作)。我尝试更改操作的名称,但这没有什么区别。下面是将项目添加到 Facebook 时间线的 Android 代码片段。然而,这只是整个难题的一小部分,因为这个项目有三个方面(Facebook、My Server 和 Android)

 public void addToTimeline() {
       dialog = ProgressDialog.show(Wishlist.this,    "",getString(R.string.adding_to_timeline), true, true);
    /*
     * Create Product URL
     */
       String productURL = HOST_SERVER_URL + HOST_PRODUCT_URI;
       Bundle productParams = new Bundle();
       productParams.putString("name", mProductName);
       productParams.putString("image", mProductImageName);
       productURL = productURL + "?" + Util.encodeUrl(productParams);

    Bundle wishlistParams = new Bundle();

    if(mPlacesAvailable) {
        try {
            wishlistParams.putString("place", mPlacesJSONArray.getJSONObject(mPlacesListSpinner.getSelectedItemPosition()).getString("id"));
        } catch (JSONException e) {}
    }
    wishlistParams.putString("wishlist", WISHLIST_OBJECTS_URL[mWishlistSpinner.getSelectedItemPosition()]);
    wishlistParams.putString("product", productURL);
    wishlistParams.putString("image", mProductImageURL);
    //TODO
    //put the app's namespace and 'add_to' action here
    Utility.mAsyncRunner.request("me/wishlisteight:adding_to", wishlistParams, "POST", new addToTimelineListener(), null);
}
4

2 回答 2

2

我还应该提到,我已经有一个可以正常运行的应用程序的工作示例(我正在尝试复制它,以便我可以调整它而不必担心失去工作)

该操作特定于应用程序 ID。当您复制代码时,您是使用相同的应用程序 ID 还是创建一个新的?如果您创建了一个新的应用程序 ID,您将需要为新应用程序注册操作,就像您对第一个应用程序所做的那样。

于 2012-01-07T13:35:26.023 回答
2

在使用 Graph API Explorer 工具将操作发布到我的应用程序的时间轴时,我遇到了此错误(#100 应用程序不拥有操作类型)。以下是我遇到此错误时输入的值以及我如何解决此问题的简要摘要。仅供参考,我的应用程序称为“recipestogo”。我为我的应用程序定义的操作称为“cook”,关联的对象称为“recipe”。

我在 Open Graph API 中输入的值:

从下拉列表中选择“发布”

https://graph.facebook.com/me/recipestogo:cook?recipe=https://www.mywebsite.com/index.html

遇到的错误:

100 应用程序不拥有动作类型

解决方案: 在 API Graph Explorer 工具的顶部右侧,Application 旁边有一个下拉菜单。它已默认设置为 Graph API Explorer。将其从 Graph API Explorer 更改为 RecipesToGo 解决了该问题,并且我能够成功发布到我的应用程序的时间线。

于 2012-08-07T21:00:09.530 回答