I'm developing a web and iOS platform where users can sign up using email/password, or sign in with Facebook or Twitter. I want the users to share content within the app and in his social profiles (Facebook wall and Twitter timeline).
For the web part, I've got things quite clear. Once the user is logged in -no matter which method uses-, he can link his account to his Facebook or Twitter profiles. In the backend I've got a one-to-many relationship between
Identity (the entity that holds the Facebook and Twitter API tokens and secrets), so that a user can have 0, 1 or 2 identities.
Now I'm building an iOS app for the platform (using an API developed in the backend) which I want to give the same login features. But let's imagine this scenario:
- The user signs in via web using email/password.
- Then, he links his account to his Facebook and Twitter profiles.
- Then he downloads the iOS app and logs in with his email and password.
My problem is that I don't know what to do to share content in Facebook and Twitter at this point. My API returns the API tokens and secrets for both
identities, but I'm not sure what I should do with them. Facebook and Twitter SDKs provide methods to sign in via the app, but what if the user has linked his account outside the app? Even more, what if the user's iPhone device doesn't have his Facebook and Twitter profiles configured in the system? Is there a common-sense approach for this scenario that I'm missing?
Thank you all in advance