4

I have created a restaurant app on Facebook and have created a custom story with the action type: "eat", and object type: "dish". When the user posts to Facebook I would like the title sentence of the post to contain the title of the dish that the user has selected, for example:

"Bob ate Pie on Restaurant App"

At the moment when I post to Facebook the result that I am getting is:

"Bob ate a dish on Restaurant App".

Everything else about the post is working as intended.

Here is the code that I am using:

NSMutableDictionary <FBOpenGraphObject> *dish = [FBGraphObject openGraphObjectForPostWithType:@"restaurant-app:dish"
                                                                                        title:@"pie"
                                                                                        image:nil
                                                                                          url:nil
                                                                                  description:@"delicious pie"];

id<FBOpenGraphAction> action = (id<FBOpenGraphAction>)[FBGraphObject graphObject];

[action setObject:dish forKey:@"dish"];

[FBSettings enableBetaFeature:FBBetaFeaturesOpenGraphShareDialog];


[FBDialogs presentShareDialogWithOpenGraphAction:action
                                      actionType:@"restaurant-app:eat"
                             previewPropertyName:@"dish"
                                         handler:^(FBAppCall *call, NSDictionary *results, NSError *error) {
                                             if(error) {
                                                 NSLog(@"Error: %@", error.description);
                                             } else {
                                                 NSLog(@"Success!");
                                             }
                                         }];

I feel like there is just a simple mistake in the code somewhere but can't figure out what it is.

Any help would be greatly appreciated,

thanks

Shayno
  • 788
  • 9
  • 26
  • 1
    Same issue here. It's as if FB is ignoring the og:title tag. – Ryan Her Nov 19 '13 at 20:42
  • 1
    I am having the exact same issue. No luck solving it yet. Storing this comment here to help guide people to a similar question, and as a note for me to stop by and provide an answer if I find one! http://stackoverflow.com/questions/21267103/ensuring-facebook-opengraph-posts-look-the-same-on-mobile-and-desktop – Davek804 Jan 24 '14 at 14:59
  • 1
    There is a bug report on this issue here: https://developers.facebook.com/bugs/560267324019484/ – ken Jun 15 '14 at 04:51

1 Answers1

11

I had the same problem. i got perfect solution try this:

  • Change the story of the type "One to One - Without Object Title" as "Object" from "Object.noun".

For e.g: Story sentense would be as follow:

"Tejas ran race with sample." Here race is my object.

  • Keep the sentence of story of the type "One to One" as Object.title as it is.

For e.g: "Tejas ran race.title with sample." Here race is my object.

Thanks, Tejas

Tejas Bharambe
  • 672
  • 1
  • 12
  • 27
  • Thanks tejas, I was searching for this from last two months. Its working perfectly. – ViruMax Jul 23 '14 at 10:03
  • 1
    I don't understand. What should we be replacing `Object.noun` with? – StuStirling Sep 25 '14 at 16:23
  • 4
    Hi Disco S2, You have to just replace the “Object.noun” to “Object” For that edit your “One to One - Without Objet Tile” sentence of your story, after that by pressing “{” key you will get options to replace “Object.noun” to “Object”. (In my case i have selected “race” object instead of “race.noun”). – Tejas Bharambe Sep 26 '14 at 05:15
  • 1
    While this really works for this case, I do not like the solution, because it seems to me that it is outputting "Object without a title". But object actually HAS a title, so it is semantically wrong. – Legoless Nov 13 '14 at 10:12
  • @TejasBharambe: Can you please tell how to replace "object.noun" to "object " as you are suggesting . When I remove it and write "object" it treaded as normal text . Please tell how to do it as I am facing the same problem. – ManiaChamp Jul 04 '15 at 07:24
  • @ManiaChamp: You have to just replace the “Object.noun” to “Object” For that edit your “One to One - Without Objet Tile” sentence of your story, after that by pressing “{” key you will get options to replace “Object.noun” to “Object” – Tejas Bharambe Jul 04 '15 at 08:48
  • @TejasBharambe: Not showing like "Maniachamp book a Sample class at Tution Point" its shows like "Maniachamp book a class at Tution Point" . Even after changing Object.tilte to Object. – ManiaChamp Jul 06 '15 at 07:17