Facebook Open Graph

I am working on an app which will publish open graph stories and will publish sentences like “xx completed a stage in nameofgame”. I have set up “Complete” as an action type and “Stage” as an object type. I tried to use this: 

local postMsg = { stage=“http://samples.ogp.me/xxxxxxxxxxx4287” }

facebook.request( “me/nameofgame:complete”, “POST”, postMsg)

but when the game is supposed to post the message, there is no pop up dialog box to let the user share the story, only the dialog box for logging in to Facebook. Then when I checked my Facebook, the story is posted there but I did not get to choose whether to post it. Furthermore, the title came out as “Sample stage” and I cannot specify which stage.

Can anyone advise on how to get the dialog box out and what is the correct way of using open graph? Or does anyone know of any good tutorial to incorporate open graph stories with Corona?

Thanks!

Hi @claris,

Facebook isn’t my specific area of expertise, but have you considered using Carrot and the Carrot plugin? Here’s more info on it:

https://www.gocarrot.com

http://docs.coronalabs.com/plugin/carrot/index.html

Best regards,

Brent

Hi Brent, thanks for your reply. I am trying to use Carrot now. I had wanted to use something like the “Share Dialog” provided in the iOS or Android SDKs which is able to post open graph stories, and it will output the content of the story and allowing the user to choose to share it or cancel. Is there no equivalent of this in Corona?

Corona SDK supports several dialogs through the facebook.showDialog() API call.  See: http://docs.coronalabs.com/api/library/facebook/showDialog.html and https://developers.facebook.com/docs/dialogs to see if this provides you what you need.

Calling
facebook.request() will “do” the action and it does not popup a box. 
Now if you’re just wanting to post on the timeline, you could look into
the Social plugin.  http://coronalabs.com/blog/2013/08/06/introducing-the-social-plugin-ios/

Rob

I’ve always hoped for more in-depth examples of what could be done through Facebook and OpenGraph.

Looks like some of the things that Carrot does - in terms of the automated OpenGraph postings, without requiring the user to click each time - would be cool to do, but have not seen examples of how it could be done.  And while I would love to use Carrot, their lack of pricing information does seem a little worrisome.

Hi Rob, thanks. I tried using the showDialog but when I tried to incorporate some variables into the message, the dialog box would not come out. I guess it is meant only for simple messages. Also, it cannot post open graph stories.

Now I understand that facebook.request() does not show a pop up dialog box but posts straightaway.

The social plugin seems nice as in the login process is smoother, but it is only available for iOS 6 and above, and does not post open graph stories, so I did not use it.

My ideal is to have a pop up dialog box showing the open graph story, then the user can choose whether to post.

@thegdog, I have checked with Carrot, and it seems like the service will be chargeable only when it reaches 10,000 clicks per month. After that it could be 10 cents per click or they have flat rates etc.

That’s the thing.  There was another thread discussing Carrot pricing, and a Carrot representative made a comment that the first 10,000 clicks per month are free and then they work with the developer after on pricing.  And that did not go over well in the thread.  The Carrot representative then seemed to stop responding.

So it does sound a little sketchy sadly.

Hi @claris,

Facebook isn’t my specific area of expertise, but have you considered using Carrot and the Carrot plugin? Here’s more info on it:

https://www.gocarrot.com

http://docs.coronalabs.com/plugin/carrot/index.html

Best regards,

Brent

Hi Brent, thanks for your reply. I am trying to use Carrot now. I had wanted to use something like the “Share Dialog” provided in the iOS or Android SDKs which is able to post open graph stories, and it will output the content of the story and allowing the user to choose to share it or cancel. Is there no equivalent of this in Corona?

Corona SDK supports several dialogs through the facebook.showDialog() API call.  See: http://docs.coronalabs.com/api/library/facebook/showDialog.html and https://developers.facebook.com/docs/dialogs to see if this provides you what you need.

Calling
facebook.request() will “do” the action and it does not popup a box. 
Now if you’re just wanting to post on the timeline, you could look into
the Social plugin.  http://coronalabs.com/blog/2013/08/06/introducing-the-social-plugin-ios/

Rob

I’ve always hoped for more in-depth examples of what could be done through Facebook and OpenGraph.

Looks like some of the things that Carrot does - in terms of the automated OpenGraph postings, without requiring the user to click each time - would be cool to do, but have not seen examples of how it could be done.  And while I would love to use Carrot, their lack of pricing information does seem a little worrisome.

Hi Rob, thanks. I tried using the showDialog but when I tried to incorporate some variables into the message, the dialog box would not come out. I guess it is meant only for simple messages. Also, it cannot post open graph stories.

Now I understand that facebook.request() does not show a pop up dialog box but posts straightaway.

The social plugin seems nice as in the login process is smoother, but it is only available for iOS 6 and above, and does not post open graph stories, so I did not use it.

My ideal is to have a pop up dialog box showing the open graph story, then the user can choose whether to post.

@thegdog, I have checked with Carrot, and it seems like the service will be chargeable only when it reaches 10,000 clicks per month. After that it could be 10 cents per click or they have flat rates etc.

That’s the thing.  There was another thread discussing Carrot pricing, and a Carrot representative made a comment that the first 10,000 clicks per month are free and then they work with the developer after on pricing.  And that did not go over well in the thread.  The Carrot representative then seemed to stop responding.

So it does sound a little sketchy sadly.