我有这个问题一段时间了,我已经看到别人也有它。它必须处理将您在Open Graph中创建的自定义对象发布到您的应用程序中。我主要在所有平台上都有这个问题,但现在让我们说我正在使用Android。如果有人已经在C#或IOS或甚至PHP中完成了这个,请发表你的答案。发布一个对象类型引用
例如:
我有一个对象向Facebook发布了一顿饭。假设它的属性如下。
mealName = "Lunch"
mealType = "Vegetarian"
mealLocation = "Somewheresville, OH"
现在我有我的Open Graph另一个对象,它被称为DailyFood。它具有以下属性。
day = "12/01/2012"
meal = "MyCustomMeal" // This references a meal object
现在,当我去张贴我尝试做在Java中以下。
//Build Meal
JSONObject mealData = new JSONObject();
mealData.put("mealName", "Lunch");
mealData.put("mealType", "Vegetarian");
mealData.put("mealLocation", "Somewheresville, OH");
Bundle params = new Bundle();
params.putString("day", "12/01/2012");
params.putString("meal", mealData.ToString());
AsyncFacebookRunner request = new AsyncFacebookRunner(facebook);
这是我生成以下错误代码的地方。
{"error":
{"message":"(#3503) is an invalid value for property
\"meal\" with type \"Reference\"","type":"OAuthException","code":3503}}
现在我知道它说OAuthException,但我可以用这个应用程序张贴饲料到Facebook就好了。如果其他人在任何平台上遇到此错误并已找到解决方案,请在此处发布。
谢谢!