Send Reference Object

I had this problem for some time, and I saw that others have it. It needs to deal with publishing your custom objects that you create in Open Graph to publish in your application. I have such a problem primarily on all platforms, but now I say that I use Android. If someone has done this in C # or iOS or even PHP, write your answer.

Example:

I have an object that sends food to Facebook. Let them say that its properties are as follows.

mealName = "Lunch"
mealType = "Vegetarian"
mealLocation = "Somewheresville, OH"

Now I have another object in my Open Graph and it is called DailyFood. It has the following properties.

day = "12/01/2012"
meal = "MyCustomMeal" // This references a meal object

Now that I get to the post, I'm trying to do the following in 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);

Here I generate the following error code.

{"error":
{"message":"(#3503) is an invalid value for property 
\"meal\" with type \"Reference\"","type":"OAuthException","code":3503}}

, OAuthException, Facebook . - , .

!

+3
2

, , -, , Facebook. , , , .

+3

- , , , ios ..

-url , refrence.

+1

All Articles