How do you get twitter to link with facebook?

How can I create an API similar to Facebook or Twitter where users copy some javascript to their website?

  • I would like to provide something like a "share" button for my website.  Users can copy some javascript which will create a link to share a page via my website.  When clicking on the link, I would handle authentication for my website.  I know that Facebook and Twitter already have similar functionality so this is a common feature of large websites. Are there any good resources to get started?  I'd rather start with something then hacking it together and finding out later that there was a much better way to go about it.  (I will write this in PHP and javascript)

  • Answer:

    You can use Ajax to check I they are signed in. If they are not you can append HTML to the body to make a popup and sign them in again with Ajax, and finally once they are signed in POST the link to that page maybe even with a message from the user to a database

Gabriel Manricks at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.