Accessing Data Object by Using Data Store APIs

Oct 17, 2007 at 7:35 AM
Hi,

As I know, in current release of Facebook Toolkit, Data Store API functions are not implemented yet. But as far as I know, by using these functions you are able to create your own tables ,columns and store your application data. By using Facebook Test Tool, I defined a table with Data.createObjectType method. And then defined columns with Data.defineObjectProperty method. I repaeted the last step according to the columns number of my new table. For each column I called same method with appropriate parameters. So... Finally I created my first object (firs data row of table) by using Data.createObject method. It returns a object id. As I understood, it creates a table row with all columns set null. Then you can set column values by using Data.setObjectProperty (You should enter the obj_id which was produced with Data.createObject. method in previous step).

By following these steps I added a few row to my table. I did some fql queries from Test Console and I got my rows. The problem is, I was able to get rows only if I pass the relevant obj_id (64 bit integer value called as fbid =facebook id ithink) to fql where clause. But isnt it too difficult to use in a web appl?

For example, these are my rows ;

_id--------------->userid-------->action------->count

5002200411289 -->565454-->1-->25
5002200411259-->654521-->4-->12
............

I forgot to mention. It is also possible to access these object with FQL queries. the objectname you used in createObjectType method, becomes yor table name. you can do queries like below
select userid,action from myApplication.MyTableName (like schemaName.TableName in Oracle)

the only way to access rows which action value is equal to 1 , to pass _id value to Data.getObject method. It doesnt accept Where action=1 clause.
So in this stuation it is not applicaple for my application. I hope I could explain my problem.

Is there any way to avhieve this? or will these API functiouns implemented in next version of Toolkit? or any other suggestions are welcome.

Thanks in advance
ilhan ercan
Jan 29, 2009 at 7:12 AM
Hi ilhan

I have the same problem, so I was wondering if you found a solution.

Regards Bilal