views:

164

answers:

1

Hi Guys,

I’m developing a website which allows users to join with GFC (Google Friend Connect). But, if users want, they can maintain their personal profile on my website (like social networking sites)

My question is “How I can synchronize GFC user with my website database?” that is, "how I can make an entry of GFC user into my website DB?"

Thanks in adv.

Swapnil

A: 

There's only a few common OpenSocial fields that GFC supports.

From the GFC docs:

  • opensocial.Person.Field.NAME — The user's human-readable name.
  • opensocial.Person.Field.ID — The user's unique ID.
  • opensocial.Person.Field.THUMBNAIL_URL — The URL of the user's thumbnail image.
  • opensocial.Person.Field.URLS — The URLs the user has put on his or her profile.
  • opensocial.Person.Field.ABOUT_ME — The content of the user's "about" field.
  • opensocial.Person.Field.PROFILE_URL — a URL that points to the user's profile page.

If the fields you're looking for aren't one of these, you could also use the OpenSocial Persistence API. In most cases, you really only need to persist the GFC ID in your database, because everything else is typically done client-side in JavaScript. If you really need to do it server-side, and you don't need to do any batch requests, there are client libraries for PHP, Python, Ruby, and Java.

Bob Aman