Jump to content

Connecting user data between apps on different social networks


nitromaster

Recommended Posts

Hi

Basically I have apps on each of the major social networks (myspace/facebook/etc), as part of the app you can add one of the pictures from your photo albums on the site to the app.

 

However, now I want to create/extend these apps, so after connecting your user ids on the different networks/apps, it'll show all the pictures you've added from the other sites.

 

 

Currently my db is set up like so:

 

photos table:

fields:

id - autoincrement number, unquie id for that image on the table.

photo_id - non autoicrement, photo id, id of the photo the user has added. this isn't unquie, but as of right now is.

owner - userid of the person who added the pic.

profile_id - id of the profile they added the picture to, mostly their own.

profile_type - type of profile, eg member/band/etc.

 

and a similar table for each social network. (all seperate apps/seperate non connected info)

 

Was thinking of doing it like this:

New table/db for the "Whole system" thing.

Some database structure like:

table: photos

fields:

id - autoicrement

social_network - the social network for which the photo comes from

photo_id - photo id for that pic, related to the social network. could have more than two entries with same photo_id but different social_network.

owner - userid of the owner of the pic, related to social network.

profile_id - id of the profile they're adding to possibly.

profile_type - type of profile they're adding to.

url - url of the picture for display purposes

 

and then having like

users:

fields:

id - autoincrement id...probaly won't be used.

facebook_id - user's facebook profile id

myspace_id - user's myspace profile id

facebook_auth - auth token/session key for the user's facebook profile.

myspace_ auth - auth token/session key for the user's myspace profile.

 

etc...

Then, i think if i was on facebook and wanted to display all the user's added pics from all networks i could do like

SELECT id, url FROM photos WHERE profile_id = currentuserid

If i just wanted to show pics from one network I'd had an AND clause for that social network.

 

Also, i need to figure out how to securely connect the various social network accounts. I presume if they were on facebook, i could generate an unique id which linked them to the myspace app..The myspace app then connected that unique id/facebook id with the myspaceid.

Anyone got any thoughts on this?

 

Would my structure above work or is there something i oversighted?

 

Thanks

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.