I have a Facebook application (we will call it mygame) related to the Android game that I am developing. In this mobile application, I want users to share their scores after the match. For this, I examined the use of Open charts, actions, and objects .
The first thing I did was create a “Play” action and a “Match” object, this one with the whole “score” property. After that, I created my first story in the form of "Play the match" using the relative button "Add user story".
First problem: all generated examples do not show preview, instead there is a red message Unable to Generate Story.
This problem was previously discussed in Stackoverflow, and the reason was that “ facebook has no examples of history for rendering . This should not be true in my case, because if I open Object Browser , I see two automatically generated Match objects. Is Facebook trying to generate examples from these posts? If not (or even true), what is the problem?
Second problemSOLVED, SEE ANSWERS: on Android, simply, I cannot check this story due to the exception that says com.facebook.FacebookException: Failed to generate preview for user..
, Facebook " ", : https://developers.facebook.com/docs/android/open-graph#sharedialog-setup
:
OpenGraphObject setObj = OpenGraphObject.Factory.createForPost("mygame:match");
setObj.setProperty("score", set.getThisUserScore());
setObj.setProperty("title", set.getType().getDisplayString());
setObj.setProperty("url", "http://www.mygame.com");
setObj.setProperty("description", "Can you beat me?");
OpenGraphAction action = GraphObject.Factory.create(OpenGraphAction.class);
action.setType("mygame:play");
action.setProperty("match", setObj);
FacebookDialog shareDialog = new FacebookDialog.OpenGraphActionDialogBuilder(activity, action, "match").build();
activity.getUiHelper().trackPendingDialogCall(shareDialog.present());
, , .
, ( ). ?