问题
I am working through the Facebook Wishlist app for Android. When I attempt to add my custom object to the Facebook graph the API returns the following error:
{
"error: {
"type": "OAuthExeption",
"message":"(#100)
Application does not own
230752723668296 action type"
}
}
I haven't been able to find any specific documentation on this particular error. Are there any Facebook developers out there who may be able to help me interpret this.
I should also mention that I already have a working example of this app running without errors (I am trying to duplicate it so I can tweak it with out fear of losing work). I have tried changing the name of the Action but this makes no difference. Below is the snippet of the Android code where it adds the item to the Facebook time line. This is however a small piece of the over all puzzle as there are three sides to this project (Facebook, My Server, and 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);
}
回答1:
"I should also mention that I already have a working example of this app running without errors (I am trying to duplicate it so I can tweak it with out fear of losing work)"
That action is specific to an app id. When you made the duplicate of your code, did you use the same app id or create a new one? If you created a new app id, you will need to register actions for the new app just like you did with the first app.
回答2:
I encountererd this error (#100 Application does not own action type) when using the Graph API Explorer tool to post an action to my app's timeline. Here is a brief summary of the values I had entered when encountering this error and how I resolved the issue. Fyi, my app is called 'recipestogo'. The action I defined for my app is called 'cook', and the associated object is called 'recipe'.
Values I entered into Open Graph API:
Chose 'Post' from the drop-down
https://graph.facebook.com/me/recipestogo:cook?recipe=https://www.mywebsite.com/index.html
Error encountered:
100 Application does not own action type
Resolution: At the top, right of the API Graph Explorer tool, there is a drop-down next to Application. It had been set by default to Graph API Explorer. Changing this from Graph API Explorer to RecipesToGo resolved the issue and I was able to successfully post to my app's timeline.
来源:https://stackoverflow.com/questions/8767351/implementing-facebook-wishlist-tutorial-application-does-not-own-action-type-err