BenM
Aug 12th, 2011, 01:20 PM
Hi again, folks.
I'm building an app accessing facebook initially but others in the future where i need to persist the connections indefinitely. I"m somewhat new to spring and spring social, so before i go too far, i want to make sure i'm taking the right basic approach.
i'm going to have a person table (1 row per user with connections) and a connection table (one row per connection per person). These will correspond to connectionrepository and connection classes. the core of it is i'll be saving the ConnectionData in the connection table and then grabbing it out of there when i need to utlize that connection later to post to the person's feed.
so i'm building implementations of usersconnectionrepository, connectionrepository and connection. does this sound like the right direction?
if so, i have a general question regarding some of the abstract methods i have to implement...
for Connection, there seem to be many that require some interface with the provider (e.g. facebook) - like getApi, sync, refresh, hasExpired, etc. i would have thought these would not be abstract.
what am i missing? where do i go to find implementations of these? is there another class i can extend or something that would provide these methods? What i see in the reference docs are Oauth1Connection and Oauth2Connection. but i'm not sure i should extend one of these, as i'd like my connection class to be independent of those particulars.
i hope this makes sense. sorry if it's a dumb question.
thanks so much for you all's very timely responses to my other questions thus far.
I'm building an app accessing facebook initially but others in the future where i need to persist the connections indefinitely. I"m somewhat new to spring and spring social, so before i go too far, i want to make sure i'm taking the right basic approach.
i'm going to have a person table (1 row per user with connections) and a connection table (one row per connection per person). These will correspond to connectionrepository and connection classes. the core of it is i'll be saving the ConnectionData in the connection table and then grabbing it out of there when i need to utlize that connection later to post to the person's feed.
so i'm building implementations of usersconnectionrepository, connectionrepository and connection. does this sound like the right direction?
if so, i have a general question regarding some of the abstract methods i have to implement...
for Connection, there seem to be many that require some interface with the provider (e.g. facebook) - like getApi, sync, refresh, hasExpired, etc. i would have thought these would not be abstract.
what am i missing? where do i go to find implementations of these? is there another class i can extend or something that would provide these methods? What i see in the reference docs are Oauth1Connection and Oauth2Connection. but i'm not sure i should extend one of these, as i'd like my connection class to be independent of those particulars.
i hope this makes sense. sorry if it's a dumb question.
thanks so much for you all's very timely responses to my other questions thus far.