Forum Sitebox Any way of accessing DB from HTML?

Discussion and help relating to the PlayerIO webpage and Facebook app hosting solution, Sitebox.

Any way of accessing DB from HTML?

Postby mindbogglegames » November 10th, 2012, 4:29 pm

I would like to implement Facebook Open Graph for my game. But from what I can tell Facebook needs to be able to call back you website to fetch the specific data of an object in the graph. I would of course like to store the information about an object in the db and serve it to Facebook dynamically instead of creating static html pages with the info. Anyway of doing this?
mindbogglegames
Paid Member
 
Posts: 38
Joined: December 19th, 2011, 6:51 pm

Re: Any way of accessing DB from HTML?

Postby dreamora » November 11th, 2012, 12:58 pm

There is no such requirement.

OpenGraph requests are POST requests you can perform from the Player.IO server side perfectly using the PlayerIO.Web class once you are on a paid subscription / on the dev server
dreamora
 
Posts: 225
Joined: March 2nd, 2012, 9:58 am

Re: Any way of accessing DB from HTML?

Postby mindbogglegames » November 11th, 2012, 1:17 pm

You sure about this?

This is what it says on http://developers.facebook.com/docs/ope ... yconcepts/

Once your action types and object types are defined in the App Dashboard, you need to create and publish your objects to Open Graph. Open Graph Objects are simply web pages with <meta> tags containing Open Graph information in the <head> section of the page. These tags describe the type of the object, the name of the object and other key information. For example, to create the "Stuffed Cookie" object for a recipe app, you should add <meta> tags to specify the object type as a recipe, its title as “Stuffed Cookies” and the URL to its representative image.

And the picture under Open Graph Mechanics under the same page shows Facebook requesting an objects metadata from the apps server
mindbogglegames
Paid Member
 
Posts: 38
Joined: December 19th, 2011, 6:51 pm

Re: Any way of accessing DB from HTML?

Postby Henrik » November 11th, 2012, 3:41 pm

No, you can't access BigDB from SiteBox. You could get the Player.IO .Net client and make your own webserver that uses that to fetch data from BigDB, but that requires you to get and manage your own webserver somewhere.

What's your use case? What objects do you need to create Open Graph metadata for?
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Any way of accessing DB from HTML?

Postby mindbogglegames » November 11th, 2012, 5:59 pm

I don't really know what the objects are going to be yet. Just checking so I can decide what is the easiest way moving forward. I do have a .NET webserver so I guess I could just use Player.IO there too for Object/Actions requests from Facebook.

I just wanted to avoid having two duplicate databases cause that would be messy and sucky to keep updated.
mindbogglegames
Paid Member
 
Posts: 38
Joined: December 19th, 2011, 6:51 pm

Re: Any way of accessing DB from HTML?

Postby dreamora » November 11th, 2012, 8:00 pm

I see what you are after but depending on what you do that does not impact you in any form actually or can be fed from the Unity / Flash Client that talks to Player IO through the javascript bridges. It really heavily depends on what you want to use where and how.
dreamora
 
Posts: 225
Joined: March 2nd, 2012, 9:58 am


Return to Sitebox



cron