MxLDevs
MxLDevs

Reputation: 19546

How do users log in to websites like facebook from some site that supports "share on facebook" features

I'm browsing some news sites and most of them have the option of posting the link on your facebook wall. Or retweeting it. Or to other social media sites.

How do they get the user to authenticate themselves? I just push a button and it asks me to log in, and then it creates a new post on my facebook wall.

I want to reproduce this behavior but don't know where to start.

Upvotes: 0

Views: 92

Answers (2)

Derek Dowling
Derek Dowling

Reputation: 479

These sites are all using OAuth. It basically involves the transaction of a request for an access token from the site you are logging in through. Your users validate that they approve the validity of your request by authenticating with the third party system such as Twitter or Facebook and then these systems return a token that allows you to read/write/modify user data from these sites on their behalf.

Upvotes: 0

bowlerae
bowlerae

Reputation: 944

Read the facebook information for developers here It allows you to create actions that users can do on your site like reading an article or post a photo and it will add it to their facebook profile. There is also the capability for users to register or login to your site using their facebook credentials.

Similarly go here for twitter.

Upvotes: 3

Related Questions